home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Technical Documentation / Mac Tech Notes (DocViewer) / Platforms & Tools / TN-Platforms & Tools < prev   
MacBinary  |  1994-07-24  |  2.8 MB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Thu Jul 15 16:12:14 1993, modified Sun Jul 24 14:59:01 1994, creator 'HLX2', type 'ONLN', 2853011 bytes "TN-Platforms & Tools" , at 0x2b8913 83269 bytes resource default (weak)
99% file data default
66% TrID raw Group 3 FAX bitmap default (weak)
33% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 54 4e 2d 50 6c 61 | 74 66 6f 72 6d 73 20 26 |..TN-Pla|tforms &|
|00000010| 20 54 6f 6f 6c 73 00 00 | 00 00 00 00 00 00 00 00 | Tools..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 2b 88 93 00 | 01 45 45 a8 6b 6a 9e aa |....+...|.EE.kj..|
|00000060| 58 6a 75 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Xju.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d2 6b 00 00 |........|.....k..|
|00000080| 50 54 20 31 20 2d 20 41 | 63 63 65 73 73 69 6e 67 |PT 1 - A|ccessing|
|00000090| 20 47 6c 6f 62 61 6c 73 | 20 46 72 6f 6d 20 4d 50 | Globals| From MP|
|000000a0| 57 20 41 73 73 65 6d 62 | 6c 79 20 4c 61 6e 67 75 |W Assemb|ly Langu|
|000000b0| 61 67 65 0d 50 6c 61 74 | 66 6f 72 6d 73 20 26 20 |age.Plat|forms & |
|000000c0| 54 6f 6f 6c 73 09 4d 2e | 50 54 2e 41 63 63 65 73 |Tools.M.|PT.Acces|
|000000d0| 73 69 6e 67 47 6c 6f 62 | 61 6c 73 46 72 6f 6d 41 |singGlob|alsFromA|
|000000e0| 53 4d 0d 52 65 76 69 73 | 65 64 20 62 79 3a 09 09 |SM.Revis|ed by:..|
|000000f0| 4d 61 72 63 68 20 31 39 | 38 38 0d 57 72 69 74 74 |March 19|88.Writt|
|00000100| 65 6e 20 62 79 3a 09 4a | 69 6d 20 46 72 69 65 64 |en by:.J|im Fried|
|00000110| 6c 61 6e 64 65 72 09 4a | 61 6e 75 61 72 79 20 31 |lander.J|anuary 1|
|00000120| 39 38 37 0d 54 68 69 73 | 20 74 65 63 68 6e 69 63 |987.This| technic|
|00000130| 61 6c 20 6e 6f 74 65 20 | 64 65 6d 6f 6e 73 74 72 |al note |demonstr|
|00000140| 61 74 65 73 20 68 6f 77 | 20 74 6f 20 61 63 63 65 |ates how| to acce|
|00000150| 73 73 20 4d 50 57 20 50 | 61 73 63 61 6c 20 61 6e |ss MPW P|ascal an|
|00000160| 64 20 4d 50 57 20 43 20 | 67 6c 6f 62 61 6c 73 20 |d MPW C |globals |
|00000170| 66 72 6f 6d 20 74 68 65 | 20 4d 50 57 20 41 73 73 |from the| MPW Ass|
|00000180| 65 6d 62 6c 65 72 2e 0d | 54 6f 20 61 6c 6c 6f 77 |embler..|To allow|
|00000190| 20 61 63 63 65 73 73 20 | 6f 66 20 4d 50 57 20 50 | access |of MPW P|
|000001a0| 61 73 63 61 6c 20 67 6c | 6f 62 61 6c 73 20 66 72 |ascal gl|obals fr|
|000001b0| 6f 6d 20 74 68 65 20 4d | 50 57 20 41 73 73 65 6d |om the M|PW Assem|
|000001c0| 62 6c 65 72 2c 20 79 6f | 75 20 6e 65 65 64 20 74 |bler, yo|u need t|
|000001d0| 6f 20 69 64 65 6e 74 69 | 66 79 20 74 68 65 20 76 |o identi|fy the v|
|000001e0| 61 72 69 61 62 6c 65 73 | 20 74 68 61 74 20 79 6f |ariables| that yo|
|000001f0| 75 20 77 69 73 68 20 74 | 6f 20 61 63 63 65 73 73 |u wish t|o access|
|00000200| 20 61 73 20 65 78 74 65 | 72 6e 61 6c 2e 20 20 54 | as exte|rnal. T|
|00000210| 6f 20 64 6f 20 74 68 69 | 73 2c 20 75 73 65 20 74 |o do thi|s, use t|
|00000220| 68 65 20 7b 24 5a 2b 7d | 20 63 6f 6d 70 69 6c 65 |he {$Z+}| compile|
|00000230| 72 20 6f 70 74 69 6f 6e | 2e 20 20 55 73 69 6e 67 |r option|. Using|
|00000240| 20 74 68 65 20 7b 24 5a | 2b 7d 20 6f 70 74 69 6f | the {$Z|+} optio|
|00000250| 6e 20 63 61 6e 20 73 75 | 62 73 74 61 6e 74 69 61 |n can su|bstantia|
|00000260| 6c 6c 79 20 69 6e 63 72 | 65 61 73 65 20 74 68 65 |lly incr|ease the|
|00000270| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 6f 62 6a | size of| the obj|
|00000280| 65 63 74 20 66 69 6c 65 | 20 64 75 65 20 74 6f 20 |ect file| due to |
|00000290| 74 68 65 20 61 64 64 69 | 74 69 6f 6e 61 6c 20 73 |the addi|tional s|
|000002a0| 79 6d 62 6f 6c 20 69 6e | 66 6f 72 6d 61 74 69 6f |ymbol in|formatio|
|000002b0| 6e 20 28 6e 6f 20 61 64 | 64 69 74 69 6f 6e 61 6c |n (no ad|ditional|
|000002c0| 20 63 6f 64 65 20 69 73 | 20 67 65 6e 65 72 61 74 | code is| generat|
|000002d0| 65 64 20 61 6e 64 20 74 | 68 65 20 73 79 6d 62 6f |ed and t|he symbo|
|000002e0| 6c 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 69 73 |l inform|ation is|
|000002f0| 20 73 74 72 69 70 70 65 | 64 20 62 79 20 74 68 65 | strippe|d by the|
|00000300| 20 6c 69 6e 6b 65 72 29 | 2e 20 20 49 66 20 79 6f | linker)|. If yo|
|00000310| 75 20 61 72 65 20 63 6f | 6e 63 65 72 6e 65 64 20 |u are co|ncerned |
|00000320| 61 62 6f 75 74 20 6f 62 | 6a 65 63 74 20 66 69 6c |about ob|ject fil|
|00000330| 65 20 73 69 7a 65 2c 20 | 79 6f 75 20 63 61 6e 20 |e size, |you can |
|00000340| d2 62 72 61 63 6b 65 74 | d3 20 74 68 65 20 76 61 |.bracket|. the va|
|00000350| 72 69 61 62 6c 65 73 20 | 79 6f 75 20 77 69 73 68 |riables |you wish|
|00000360| 20 74 6f 20 61 63 63 65 | 73 73 20 61 73 20 65 78 | to acce|ss as ex|
|00000370| 74 65 72 6e 61 6c 20 76 | 61 72 69 61 62 6c 65 73 |ternal v|ariables|
|00000380| 20 77 69 74 68 20 7b 24 | 5a 2b 7d 20 61 6e 64 20 | with {$|Z+} and |
|00000390| 7b 24 5a 2d 7d 2e 20 48 | 65 72 65 d5 73 20 61 20 |{$Z-}. H|ere.s a |
|000003a0| 74 72 69 76 69 61 6c 20 | 65 78 61 6d 70 6c 65 3a |trivial |example:|
|000003b0| 0d 50 61 73 63 61 6c 20 | 53 6f 75 72 63 65 0d 09 |.Pascal |Source..|
|000003c0| 50 52 4f 47 52 41 4d 20 | 4d 79 50 61 73 63 61 6c |PROGRAM |MyPascal|
|000003d0| 3b 0d 09 55 53 45 53 0d | 09 20 20 20 4d 65 6d 54 |;..USES.|. MemT|
|000003e0| 79 70 65 73 2c 51 75 69 | 63 6b 44 72 61 77 2c 4f |ypes,Qui|ckDraw,O|
|000003f0| 53 49 6e 74 66 2c 54 6f | 6f 6c 49 6e 74 66 3b 0d |SIntf,To|olIntf;.|
|00000400| 09 0d 09 56 41 52 0d 09 | 20 20 20 6d 79 57 52 65 |...VAR..| myWRe|
|00000410| 63 74 3a 20 52 65 63 74 | 3b 0d 09 7b 24 5a 2b 7d |ct: Rect|;..{$Z+}|
|00000420| 20 7b 6d 61 6b 65 20 74 | 68 65 20 66 6f 6c 6c 6f | {make t|he follo|
|00000430| 77 69 6e 67 20 65 78 74 | 65 72 6e 61 6c 7d 0d 09 |wing ext|ernal}..|
|00000440| 20 20 20 6d 79 49 6e 74 | 3a 20 49 6e 74 65 67 65 | myInt|: Intege|
|00000450| 72 3b 0d 09 7b 24 5a 2d | 7d 20 7b 6d 61 6b 65 20 |r;..{$Z-|} {make |
|00000460| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6c 6f |the foll|owing lo|
|00000470| 63 61 6c 20 74 6f 20 74 | 68 69 73 20 66 69 6c 65 |cal to t|his file|
|00000480| 20 28 6e 6f 74 20 6c 65 | 78 69 63 61 6c 6c 79 20 | (not le|xically |
|00000490| 6c 6f 63 61 6c 29 7d 0d | 09 20 20 20 65 72 72 3a |local)}.|. err:|
|000004a0| 20 49 6e 74 65 67 65 72 | 3b 0d 09 50 52 4f 43 45 | Integer|;..PROCE|
|000004b0| 44 55 52 45 20 4d 79 41 | 73 6d 3b 20 45 58 54 45 |DURE MyA|sm; EXTE|
|000004c0| 52 4e 41 4c 3b 20 7b 72 | 6f 75 74 69 6e 65 20 64 |RNAL; {r|outine d|
|000004d0| 6f 75 62 6c 65 73 20 74 | 68 65 20 76 61 6c 75 65 |oubles t|he value|
|000004e0| 20 6f 66 20 6d 79 49 6e | 74 7d 0d 09 42 45 47 49 | of myIn|t}..BEGI|
|000004f0| 4e 20 7b 50 52 4f 47 52 | 41 4d 7d 0d 09 20 20 20 |N {PROGR|AM}.. |
|00000500| 6d 79 49 6e 74 3a 3d 20 | 35 3b 0d 09 20 20 20 4d |myInt:= |5;.. M|
|00000510| 79 41 73 6d 3b 20 7b 63 | 61 6c 6c 20 74 68 65 20 |yAsm; {c|all the |
|00000520| 72 6f 75 74 69 6e 65 2c | 20 6d 79 49 6e 74 20 77 |routine,| myInt w|
|00000530| 69 6c 6c 20 62 65 20 31 | 30 20 6e 6f 77 7d 0d 09 |ill be 1|0 now}..|
|00000540| 20 20 20 77 72 69 74 65 | 6c 6e 28 27 54 68 65 20 | write|ln('The |
|00000550| 76 61 6c 75 65 20 6f 66 | 20 6d 79 49 6e 74 20 61 |value of| myInt a|
|00000560| 66 74 65 72 20 63 61 6c | 6c 69 6e 67 20 6d 79 41 |fter cal|ling myA|
|00000570| 73 6d 20 69 73 20 27 2c | 20 6d 79 49 6e 74 3a 31 |sm is ',| myInt:1|
|00000580| 29 3b 0d 09 45 4e 44 2e | 20 7b 50 52 4f 47 52 41 |);..END.| {PROGRA|
|00000590| 4d 7d 0d 41 73 73 65 6d | 62 6c 79 20 53 6f 75 72 |M}.Assem|bly Sour|
|000005a0| 63 65 20 66 6f 72 20 50 | 61 73 63 61 6c 0d 09 20 |ce for P|ascal.. |
|000005b0| 20 20 20 20 20 20 20 43 | 41 53 45 20 20 20 4f 46 | C|ASE OF|
|000005c0| 46 20 20 20 20 20 20 20 | 20 20 20 3b 74 72 65 61 |F | ;trea|
|000005d0| 74 20 75 70 70 65 72 20 | 61 6e 64 20 6c 6f 77 65 |t upper |and lowe|
|000005e0| 72 20 63 61 73 65 20 69 | 64 65 6e 74 69 63 61 6c |r case i|dentical|
|000005f0| 6c 79 0d 09 4d 79 41 73 | 6d 20 20 20 50 52 4f 43 |ly..MyAs|m PROC|
|00000600| 20 20 20 45 58 50 4f 52 | 54 20 20 20 20 20 20 20 | EXPOR|T |
|00000610| 3b 43 41 53 45 20 4f 46 | 46 20 69 73 20 74 68 65 |;CASE OF|F is the|
|00000620| 20 61 73 73 65 6d 62 6c | 65 72 27 73 20 64 65 66 | assembl|er's def|
|00000630| 61 75 6c 74 0d 09 20 20 | 20 20 20 20 20 20 49 4d |ault.. | IM|
|00000640| 50 4f 52 54 20 6d 79 49 | 6e 74 3a 44 41 54 41 20 |PORT myI|nt:DATA |
|00000650| 20 20 3b 77 65 20 6e 65 | 65 64 20 3a 44 41 54 41 | ;we ne|ed :DATA|
|00000660| 2c 20 74 68 65 20 61 73 | 73 65 6d 62 6c 65 72 20 |, the as|sembler |
|00000670| 61 73 73 75 6d 65 73 20 | 43 4f 44 45 0d 09 20 20 |assumes |CODE.. |
|00000680| 20 20 20 20 20 20 41 53 | 4c 2e 57 20 20 23 31 2c | AS|L.W #1,|
|00000690| 6d 79 49 6e 74 20 20 20 | 20 20 3b 6d 75 6c 74 69 |myInt | ;multi|
|000006a0| 70 6c 79 20 62 79 20 74 | 77 6f 0d 09 20 20 20 20 |ply by t|wo.. |
|000006b0| 20 20 20 20 52 54 53 20 | 20 20 20 20 20 20 20 20 | RTS | |
|000006c0| 20 20 20 20 20 20 20 20 | 3b 61 6c 6c 20 64 6f 6e | |;all don|
|000006d0| 65 20 77 69 74 68 20 74 | 68 69 73 20 65 78 74 65 |e with t|his exte|
|000006e0| 6e 73 69 76 65 20 72 6f | 75 74 69 6e 65 2c 20 77 |nsive ro|utine, w|
|000006f0| 68 65 77 21 0d 09 20 20 | 20 20 20 20 20 20 45 4e |hew!.. | EN|
|00000700| 44 0d 54 68 65 20 76 61 | 72 69 61 62 6c 65 20 6d |D.The va|riable m|
|00000710| 79 49 6e 74 20 69 73 20 | 61 63 63 65 73 73 69 62 |yInt is |accessib|
|00000720| 6c 65 20 66 72 6f 6d 20 | 61 73 73 65 6d 62 6c 65 |le from |assemble|
|00000730| 72 2e 20 20 4e 65 69 74 | 68 65 72 20 6d 79 57 52 |r. Neit|her myWR|
|00000740| 65 63 74 20 6e 6f 72 20 | 65 72 72 20 61 72 65 20 |ect nor |err are |
|00000750| 61 63 63 65 73 73 69 62 | 6c 65 2e 20 20 49 66 20 |accessib|le. If |
|00000760| 79 6f 75 20 74 72 79 20 | 74 6f 20 61 63 63 65 73 |you try |to acces|
|00000770| 73 20 20 6d 79 57 52 65 | 63 74 2c 20 66 6f 72 20 |s myWRe|ct, for |
|00000780| 65 78 61 6d 70 6c 65 2c | 20 66 72 6f 6d 20 61 73 |example,| from as|
|00000790| 73 65 6d 62 6c 65 72 2c | 20 79 6f 75 20 77 69 6c |sembler,| you wil|
|000007a0| 6c 20 67 65 74 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |l get th|e follow|
|000007b0| 69 6e 67 20 6c 69 6e 6b | 65 72 20 65 72 72 6f 72 |ing link|er error|
|000007c0| 3a 0d 09 23 23 23 20 4c | 69 6e 6b 3a 20 45 72 72 |:..### L|ink: Err|
|000007d0| 6f 72 20 20 20 55 6e 64 | 65 66 69 6e 65 64 20 65 |or Und|efined e|
|000007e0| 6e 74 72 79 20 6e 61 6d | 65 3a 20 20 20 4d 59 57 |ntry nam|e: MYW|
|000007f0| 52 45 43 54 2e 0d 43 20 | 53 6f 75 72 63 65 0d 49 |RECT..C |Source.I|
|00000800| 6e 20 61 6e 20 4d 50 57 | 20 43 20 70 72 6f 67 72 |n an MPW| C progr|
|00000810| 61 6d 2c 20 6f 6e 65 20 | 6e 65 65 64 20 6f 6e 6c |am, one |need onl|
|00000820| 79 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |y make s|ure that|
|00000830| 20 4d 79 41 73 6d 20 69 | 73 20 64 65 63 6c 61 72 | MyAsm i|s declar|
|00000840| 65 64 20 61 73 20 61 6e | 20 65 78 74 65 72 6e 61 |ed as an| externa|
|00000850| 6c 20 66 75 6e 63 74 69 | 6f 6e 2c 20 74 68 61 74 |l functi|on, that|
|00000860| 20 6d 79 49 6e 74 20 69 | 73 20 61 20 67 6c 6f 62 | myInt i|s a glob|
|00000870| 61 6c 20 76 61 72 69 61 | 62 6c 65 20 28 63 61 70 |al varia|ble (cap|
|00000880| 69 74 61 6c 69 7a 61 74 | 69 6f 6e 73 20 6d 75 73 |italizat|ions mus|
|00000890| 74 20 6d 61 74 63 68 29 | 20 61 6e 64 20 74 68 61 |t match)| and tha|
|000008a0| 74 20 74 68 65 20 43 41 | 53 45 20 4f 4e 20 64 69 |t the CA|SE ON di|
|000008b0| 72 65 63 74 69 76 65 20 | 69 73 20 75 73 65 64 20 |rective |is used |
|000008c0| 69 6e 20 74 68 65 20 41 | 73 73 65 6d 62 6c 65 72 |in the A|ssembler|
|000008d0| 3a 20 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 74 79 |: ..#inc|lude <ty|
|000008e0| 70 65 73 2e 68 3e 0d 09 | 23 69 6e 63 6c 75 64 65 |pes.h>..|#include|
|000008f0| 20 3c 71 75 69 63 6b 64 | 72 61 77 2e 68 3e 0d 09 | <quickd|raw.h>..|
|00000900| 23 69 6e 63 6c 75 64 65 | 20 3c 66 6f 6e 74 73 2e |#include| <fonts.|
|00000910| 68 3e 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 77 69 |h>..#inc|lude <wi|
|00000920| 6e 64 6f 77 73 2e 68 3e | 0d 09 23 69 6e 63 6c 75 |ndows.h>|..#inclu|
|00000930| 64 65 20 3c 65 76 65 6e | 74 73 2e 68 3e 0d 09 23 |de <even|ts.h>..#|
|00000940| 69 6e 63 6c 75 64 65 20 | 3c 74 65 78 74 65 64 69 |include |<textedi|
|00000950| 74 2e 68 3e 0d 09 23 69 | 6e 63 6c 75 64 65 20 3c |t.h>..#i|nclude <|
|00000960| 64 69 61 6c 6f 67 73 2e | 68 3e 0d 09 23 69 6e 63 |dialogs.|h>..#inc|
|00000970| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0d 09 |lude <st|dio.h>..|
|00000980| 65 78 74 65 72 6e 20 4d | 79 41 73 6d 28 29 3b 20 |extern M|yAsm(); |
|00000990| 20 20 20 2f 2a 20 61 73 | 73 65 6d 62 6c 79 20 72 | /* as|sembly r|
|000009a0| 6f 75 74 69 6e 65 20 74 | 68 61 74 20 64 6f 75 62 |outine t|hat doub|
|000009b0| 6c 65 73 20 76 61 6c 75 | 65 20 6f 66 20 6d 79 49 |les valu|e of myI|
|000009c0| 6e 74 20 2a 2f 0d 09 73 | 68 6f 72 74 20 6d 79 49 |nt */..s|hort myI|
|000009d0| 6e 74 3b 20 20 20 20 20 | 20 2f 2a 20 77 65 d5 6c |nt; | /* we.l|
|000009e0| 6c 20 63 68 61 6e 67 65 | 20 74 68 65 20 76 61 6c |l change| the val|
|000009f0| 75 65 20 6f 66 20 74 68 | 69 73 20 66 72 6f 6d 20 |ue of th|is from |
|00000a00| 4d 79 41 73 6d 20 2a 2f | 0d 09 6d 61 69 6e 28 29 |MyAsm */|..main()|
|00000a10| 0d 09 7b 0d 09 57 69 6e | 64 6f 77 50 74 72 20 4d |..{..Win|dowPtr M|
|00000a20| 79 57 69 6e 64 6f 77 3b | 0d 09 52 65 63 74 20 6d |yWindow;|..Rect m|
|00000a30| 79 57 52 65 63 74 3b 0d | 09 6d 79 49 6e 74 20 3d |yWRect;.|.myInt =|
|00000a40| 20 35 3b 0d 09 4d 79 41 | 73 6d 28 29 3b 0d 09 70 | 5;..MyA|sm();..p|
|00000a50| 72 69 6e 74 66 28 22 20 | 54 68 65 20 76 61 6c 75 |rintf(" |The valu|
|00000a60| 65 20 6f 66 20 6d 79 49 | 6e 74 20 61 66 74 65 72 |e of myI|nt after|
|00000a70| 20 63 61 6c 6c 69 6e 67 | 20 6d 79 41 73 6d 20 69 | calling| myAsm i|
|00000a80| 73 20 25 64 5c 6e 22 2c | 6d 79 49 6e 74 29 3b 0d |s %d\n",|myInt);.|
|00000a90| 09 7d 20 2f 2a 6d 61 69 | 6e 2a 2f 0d 41 73 73 65 |.} /*mai|n*/.Asse|
|00000aa0| 6d 62 6c 79 20 73 6f 75 | 72 63 65 20 66 6f 72 20 |mbly sou|rce for |
|00000ab0| 43 0d 09 20 20 20 20 20 | 20 20 20 43 41 53 45 20 |C.. | CASE |
|00000ac0| 20 20 4f 4e 20 20 20 20 | 20 20 20 20 20 20 20 3b | ON | ;|
|00000ad0| 74 72 65 61 74 20 75 70 | 70 65 72 20 61 6e 64 20 |treat up|per and |
|00000ae0| 6c 6f 77 65 72 20 63 61 | 73 65 20 64 69 73 74 69 |lower ca|se disti|
|00000af0| 6e 63 74 0d 09 4d 79 41 | 73 6d 20 20 20 50 52 4f |nct..MyA|sm PRO|
|00000b00| 43 20 20 20 45 58 50 4f | 52 54 20 20 20 20 20 20 |C EXPO|RT |
|00000b10| 20 3b 74 68 69 73 20 69 | 73 20 68 6f 77 20 43 20 | ;this i|s how C |
|00000b20| 74 72 65 61 74 73 20 75 | 70 70 65 72 20 61 6e 64 |treats u|pper and|
|00000b30| 20 6c 6f 77 65 72 20 63 | 61 73 65 0d 09 20 20 20 | lower c|ase.. |
|00000b40| 20 20 20 20 20 49 4d 50 | 4f 52 54 20 6d 79 49 6e | IMP|ORT myIn|
|00000b50| 74 3a 44 41 54 41 20 20 | 20 3b 77 65 20 6e 65 65 |t:DATA | ;we nee|
|00000b60| 64 20 3a 44 41 54 41 2c | 20 74 68 65 20 61 73 73 |d :DATA,| the ass|
|00000b70| 65 6d 62 6c 65 72 20 61 | 73 73 75 6d 65 73 20 43 |embler a|ssumes C|
|00000b80| 4f 44 45 0d 09 20 20 20 | 20 20 20 20 20 41 53 4c |ODE.. | ASL|
|00000b90| 2e 57 20 20 23 31 2c 6d | 79 49 6e 74 20 20 20 20 |.W #1,m|yInt |
|00000ba0| 20 3b 6d 75 6c 74 69 70 | 6c 79 20 62 79 20 74 77 | ;multip|ly by tw|
|00000bb0| 6f 0d 09 20 20 20 20 20 | 20 20 20 52 54 53 20 20 |o.. | RTS |
|00000bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00000bd0| 61 6c 6c 20 64 6f 6e 65 | 20 77 69 74 68 20 74 68 |all done| with th|
|00000be0| 69 73 20 65 78 74 65 6e | 73 69 76 65 20 72 6f 75 |is exten|sive rou|
|00000bf0| 74 69 6e 65 2c 20 77 68 | 65 77 21 0d 09 20 20 20 |tine, wh|ew!.. |
|00000c00| 20 20 20 20 20 45 4e 44 | 0d 46 75 72 74 68 65 72 | END|.Further|
|00000c10| 20 52 65 66 65 72 65 6e | 63 65 3a 0d a5 09 4d 50 | Referen|ce:...MP|
|00000c20| 57 20 52 65 66 65 72 65 | 6e 63 65 20 4d 61 6e 75 |W Refere|nce Manu|
|00000c30| 61 6c 0d 50 54 20 32 20 | 2d 20 4d 50 57 20 43 20 |al.PT 2 |- MPW C |
|00000c40| 47 6c 75 65 20 66 6f 72 | 20 50 6f 69 6e 74 20 26 |Glue for| Point &|
|00000c50| 20 53 74 72 69 6e 67 20 | 46 75 6e 63 74 69 6f 6e | String |Function|
|00000c60| 73 0d 50 6c 61 74 66 6f | 72 6d 73 20 26 20 54 6f |s.Platfo|rms & To|
|00000c70| 6f 6c 73 09 0d 52 65 76 | 69 73 65 64 20 62 79 3a |ols..Rev|ised by:|
|00000c80| 09 09 4d 61 72 63 68 20 | 31 39 38 38 0d 57 72 69 |..March |1988.Wri|
|00000c90| 74 74 65 6e 20 62 79 3a | 09 46 72 65 64 20 41 2e |tten by:|.Fred A.|
|00000ca0| 20 48 75 78 68 61 6d 09 | 4e 6f 76 65 6d 62 65 72 | Huxham.|November|
|00000cb0| 20 31 39 38 37 0d 4d 50 | 57 20 32 2e 30 20 69 6e | 1987.MP|W 2.0 in|
|00000cc0| 63 6c 75 64 65 73 20 6e | 65 77 20 43 20 69 6e 74 |cludes n|ew C int|
|00000cd0| 65 72 66 61 63 65 73 20 | 74 6f 20 52 4f 4d 20 72 |erfaces |to ROM r|
|00000ce0| 6f 75 74 69 6e 65 73 20 | 77 68 69 63 68 20 6e 6f |outines |which no|
|00000cf0| 20 6c 6f 6e 67 65 72 20 | 64 6f 20 73 74 72 69 6e | longer |do strin|
|00000d00| 67 20 61 6e 64 20 70 6f | 69 6e 74 20 63 6f 6e 76 |g and po|int conv|
|00000d10| 65 72 73 69 6f 6e 73 2e | 20 54 68 65 73 65 20 6e |ersions.| These n|
|00000d20| 65 77 20 69 6e 74 65 72 | 66 61 63 65 73 20 61 72 |ew inter|faces ar|
|00000d30| 65 20 64 65 73 63 72 69 | 62 65 64 20 68 65 72 65 |e descri|bed here|
|00000d40| 2e 0d 49 6e 20 4d 50 57 | 20 70 72 69 6f 72 20 74 |..In MPW| prior t|
|00000d50| 6f 20 32 2e 30 2c 20 74 | 68 65 20 43 20 69 6e 74 |o 2.0, t|he C int|
|00000d60| 65 72 66 61 63 65 73 20 | 74 6f 20 4d 61 63 69 6e |erfaces |to Macin|
|00000d70| 74 6f 73 68 20 4f 53 20 | 61 6e 64 20 54 6f 6f 6c |tosh OS |and Tool|
|00000d80| 62 6f 78 20 72 6f 75 74 | 69 6e 65 73 20 74 68 61 |box rout|ines tha|
|00000d90| 74 20 68 61 64 20 73 74 | 72 69 6e 67 73 20 6f 72 |t had st|rings or|
|00000da0| 20 70 6f 69 6e 74 73 20 | 61 73 20 61 72 67 75 6d | points |as argum|
|00000db0| 65 6e 74 73 20 72 65 71 | 75 69 72 65 64 20 66 6f |ents req|uired fo|
|00000dc0| 6c 6c 6f 77 69 6e 67 20 | 74 68 65 73 65 20 72 75 |llowing |these ru|
|00000dd0| 6c 65 73 3a 0d 09 31 2e | 20 53 74 72 69 6e 67 73 |les:..1.| Strings|
|00000de0| 20 6d 75 73 74 20 62 65 | 20 70 61 73 73 65 64 20 | must be| passed |
|00000df0| 61 73 20 43 20 73 74 72 | 69 6e 67 73 20 28 6e 75 |as C str|ings (nu|
|00000e00| 6c 6c 20 74 65 72 6d 69 | 6e 61 74 65 64 29 2e 0d |ll termi|nated)..|
|00000e10| 09 32 2e 20 50 6f 69 6e | 74 73 20 6d 75 73 74 20 |.2. Poin|ts must |
|00000e20| 62 65 20 70 61 73 73 65 | 64 20 62 79 20 61 64 64 |be passe|d by add|
|00000e30| 72 65 73 73 2e 0d 57 69 | 74 68 20 74 68 69 73 20 |ress..Wi|th this |
|00000e40| 6d 65 74 68 6f 64 2c 20 | 61 6c 6c 20 74 68 65 73 |method, |all thes|
|00000e50| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 77 6f 75 6c |e functi|ons woul|
|00000e60| 64 20 65 6e 64 20 75 70 | 20 63 61 6c 6c 69 6e 67 |d end up| calling|
|00000e70| 20 67 6c 75 65 20 63 6f | 64 65 20 74 6f 3a 0d 09 | glue co|de to:..|
|00000e80| 31 2e 20 43 6f 6e 76 65 | 72 74 20 74 68 65 20 43 |1. Conve|rt the C|
|00000e90| 20 73 74 72 69 6e 67 73 | 20 74 6f 20 50 61 73 63 | strings| to Pasc|
|00000ea0| 61 6c 20 73 74 72 69 6e | 67 73 2e 0d 09 32 2e 20 |al strin|gs...2. |
|00000eb0| 44 65 72 65 66 65 72 65 | 6e 63 65 20 74 68 65 20 |Derefere|nce the |
|00000ec0| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 50 |address |of the P|
|00000ed0| 6f 69 6e 74 20 62 65 66 | 6f 72 65 20 70 75 73 68 |oint bef|ore push|
|00000ee0| 69 6e 67 20 69 74 20 6f | 6e 74 6f 20 74 68 65 20 |ing it o|nto the |
|00000ef0| 73 74 61 63 6b 2e 0d 42 | 65 63 61 75 73 65 20 6f |stack..B|ecause o|
|00000f00| 66 20 74 68 69 73 20 79 | 6f 75 72 20 61 70 70 6c |f this y|our appl|
|00000f10| 69 63 61 74 69 6f 6e 73 | 20 65 6e 64 65 64 20 75 |ications| ended u|
|00000f20| 70 20 62 65 69 6e 67 20 | 73 6c 69 67 68 74 6c 79 |p being |slightly|
|00000f30| 20 6c 61 72 67 65 72 20 | 28 64 75 65 20 74 6f 20 | larger |(due to |
|00000f40| 74 68 65 20 67 6c 75 65 | 20 63 6f 64 65 20 6e 65 |the glue| code ne|
|00000f50| 65 64 65 64 29 20 61 6e | 64 20 73 6c 69 67 68 74 |eded) an|d slight|
|00000f60| 6c 79 20 73 6c 6f 77 65 | 72 20 28 64 75 65 20 74 |ly slowe|r (due t|
|00000f70| 6f 20 74 68 65 20 74 69 | 6d 65 20 69 74 20 74 61 |o the ti|me it ta|
|00000f80| 6b 65 73 20 74 6f 20 65 | 78 65 63 75 74 65 20 74 |kes to e|xecute t|
|00000f90| 68 65 20 67 6c 75 65 20 | 63 6f 64 65 29 2e 0d 4d |he glue |code)..M|
|00000fa0| 50 57 20 32 2e 30 20 43 | 20 69 6e 74 65 72 66 61 |PW 2.0 C| interfa|
|00000fb0| 63 65 73 20 69 6e 63 6c | 75 64 65 20 61 20 6e 65 |ces incl|ude a ne|
|00000fc0| 77 20 73 65 74 20 6f 66 | 20 41 4c 4c 20 43 41 50 |w set of| ALL CAP|
|00000fd0| 53 20 72 6f 75 74 69 6e | 65 73 20 74 68 61 74 20 |S routin|es that |
|00000fe0| 68 61 76 65 20 73 74 72 | 69 6e 67 73 20 6f 72 20 |have str|ings or |
|00000ff0| 70 6f 69 6e 74 73 20 61 | 73 20 61 72 67 75 6d 65 |points a|s argume|
|00001000| 6e 74 73 2e 20 54 68 65 | 73 65 20 72 6f 75 74 69 |nts. The|se routi|
|00001010| 6e 65 73 20 72 65 71 75 | 69 72 65 20 66 6f 6c 6c |nes requ|ire foll|
|00001020| 6f 77 69 6e 67 20 74 68 | 65 73 65 20 72 75 6c 65 |owing th|ese rule|
|00001030| 73 3a 0d 09 31 2e 20 53 | 74 72 69 6e 67 73 20 6d |s:..1. S|trings m|
|00001040| 75 73 74 20 62 65 20 70 | 61 73 73 65 64 20 61 73 |ust be p|assed as|
|00001050| 20 50 61 73 63 61 6c 20 | 73 74 72 69 6e 67 73 20 | Pascal |strings |
|00001060| 28 70 72 65 63 65 64 65 | 64 20 62 79 20 61 20 6c |(precede|d by a l|
|00001070| 65 6e 67 74 68 20 62 79 | 74 65 29 2e 0d 09 32 2e |ength by|te)...2.|
|00001080| 20 50 6f 69 6e 74 73 20 | 6d 75 73 74 20 62 65 20 | Points |must be |
|00001090| 70 61 73 73 65 64 20 62 | 79 20 76 61 6c 75 65 2e |passed b|y value.|
|000010a0| 0d 43 61 6c 6c 69 6e 67 | 20 74 68 65 73 65 20 6e |.Calling| these n|
|000010b0| 65 77 20 72 6f 75 74 69 | 6e 65 73 20 72 65 73 75 |ew routi|nes resu|
|000010c0| 6c 74 73 20 69 6e 20 73 | 6d 61 6c 6c 65 72 20 61 |lts in s|maller a|
|000010d0| 6e 64 20 66 61 73 74 65 | 72 20 63 6f 64 65 2e 20 |nd faste|r code. |
|000010e0| 20 49 6e 20 6f 74 68 65 | 72 20 77 6f 72 64 73 2c | In othe|r words,|
|000010f0| 20 74 68 65 73 65 20 6e | 65 77 20 69 6e 74 65 72 | these n|ew inter|
|00001100| 66 61 63 65 73 20 61 72 | 65 20 79 6f 75 72 20 66 |faces ar|e your f|
|00001110| 72 69 65 6e 64 2e 0d 53 | 6f 6d 65 20 45 78 61 6d |riend..S|ome Exam|
|00001120| 70 6c 65 73 0d 46 69 72 | 73 74 2c 20 73 6f 6d 65 |ples.Fir|st, some|
|00001130| 20 50 6f 69 6e 74 20 65 | 78 61 6d 70 6c 65 73 3a | Point e|xamples:|
|00001140| 0d 54 68 65 20 72 6f 75 | 74 69 6e 65 20 50 74 49 |.The rou|tine PtI|
|00001150| 6e 52 65 63 74 2c 20 28 | 6f 6c 64 20 73 74 79 6c |nRect, (|old styl|
|00001160| 65 2c 20 6d 69 78 65 64 | 20 63 61 73 65 29 2c 20 |e, mixed| case), |
|00001170| 72 65 71 75 69 72 65 73 | 20 61 20 70 6f 69 6e 74 |requires| a point|
|00001180| 20 70 61 73 73 65 64 20 | 62 79 20 61 64 64 72 65 | passed |by addre|
|00001190| 73 73 2e 20 20 54 68 65 | 20 6e 65 77 20 69 6e 74 |ss. The| new int|
|000011a0| 65 72 66 61 63 65 3a 0d | 09 70 61 73 63 61 6c 20 |erface:.|.pascal |
|000011b0| 42 6f 6f 6c 65 61 6e 20 | 50 54 49 4e 52 45 43 54 |Boolean |PTINRECT|
|000011c0| 28 70 74 2c 72 29 0d 09 | 20 20 20 20 50 6f 69 6e |(pt,r)..| Poin|
|000011d0| 74 20 70 74 3b 0d 09 20 | 20 20 20 52 65 63 74 20 |t pt;.. | Rect |
|000011e0| 2a 72 3b 0d 09 20 20 20 | 20 65 78 74 65 72 6e 20 |*r;.. | extern |
|000011f0| 30 78 41 38 41 44 3b 0d | 72 65 71 75 69 72 65 73 |0xA8AD;.|requires|
|00001200| 20 74 68 61 74 20 74 68 | 65 20 50 6f 69 6e 74 20 | that th|e Point |
|00001210| 61 72 67 75 6d 65 6e 74 | 20 62 65 20 70 61 73 73 |argument| be pass|
|00001220| 65 64 20 62 79 20 76 61 | 6c 75 65 2e 0d 41 6e 64 |ed by va|lue..And|
|00001230| 20 6e 6f 77 2c 20 73 6f | 6d 65 20 73 74 72 69 6e | now, so|me strin|
|00001240| 67 20 65 78 61 6d 70 6c | 65 73 3a 0d 54 68 65 20 |g exampl|es:.The |
|00001250| 72 6f 75 74 69 6e 65 20 | 53 74 72 69 6e 67 57 69 |routine |StringWi|
|00001260| 64 74 68 2c 20 28 6f 6c | 64 20 73 74 79 6c 65 2c |dth, (ol|d style,|
|00001270| 20 6d 69 78 65 64 20 63 | 61 73 65 29 2c 20 72 65 | mixed c|ase), re|
|00001280| 71 75 69 72 65 64 20 61 | 20 43 20 73 74 72 69 6e |quired a| C strin|
|00001290| 67 20 61 73 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |g as an |argument|
|000012a0| 2e 20 20 54 68 65 20 6e | 65 77 20 69 6e 74 65 72 |. The n|ew inter|
|000012b0| 66 61 63 65 3a 0d 09 70 | 61 73 63 61 6c 20 73 68 |face:..p|ascal sh|
|000012c0| 6f 72 74 20 53 54 52 49 | 4e 47 57 49 44 54 48 28 |ort STRI|NGWIDTH(|
|000012d0| 73 29 0d 09 20 20 20 20 | 53 74 72 32 35 35 20 2a |s).. |Str255 *|
|000012e0| 73 3b 0d 09 20 20 20 20 | 65 78 74 65 72 6e 20 30 |s;.. |extern 0|
|000012f0| 78 41 38 38 43 3b 0d 72 | 65 71 75 69 72 65 73 20 |xA88C;.r|equires |
|00001300| 74 68 61 74 20 74 68 65 | 20 61 72 67 75 6d 65 6e |that the| argumen|
|00001310| 74 20 62 65 20 70 61 73 | 73 65 64 20 61 73 20 61 |t be pas|sed as a|
|00001320| 20 50 61 73 63 61 6c 20 | 73 74 72 69 6e 67 2e 0d | Pascal |string..|
|00001330| 50 61 73 63 61 6c 20 53 | 74 72 69 6e 67 73 0d 41 |Pascal S|trings.A|
|00001340| 6e 6f 74 68 65 72 20 6e | 65 77 20 66 65 61 74 75 |nother n|ew featu|
|00001350| 72 65 20 6f 66 20 4d 50 | 57 20 32 2e 30 20 43 20 |re of MP|W 2.0 C |
|00001360| 69 73 20 74 68 65 20 63 | 72 65 61 74 69 6f 6e 20 |is the c|reation |
|00001370| 6f 66 20 50 61 73 63 61 | 6c 20 73 74 72 69 6e 67 |of Pasca|l string|
|00001380| 73 2e 20 20 59 6f 75 20 | 63 61 6e 20 6e 6f 77 20 |s. You |can now |
|00001390| 63 72 65 61 74 65 20 61 | 20 50 61 73 63 61 6c 20 |create a| Pascal |
|000013a0| 73 74 72 69 6e 67 20 62 | 79 20 75 73 69 6e 67 20 |string b|y using |
|000013b0| 74 68 65 20 d2 5c 70 d3 | 20 6f 70 74 69 6f 6e 2e |the .\p.| option.|
|000013c0| 20 20 54 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 | The fo|llowing |
|000013d0| 65 78 61 6d 70 6c 65 20 | 64 65 6d 6f 6e 73 74 72 |example |demonstr|
|000013e0| 61 74 65 73 20 74 68 69 | 73 20 6e 65 77 20 66 65 |ates thi|s new fe|
|000013f0| 61 74 75 72 65 3a 0d 09 | 63 53 74 72 69 6e 67 31 |ature:..|cString1|
|00001400| 20 3d 20 22 54 68 69 73 | 20 69 73 20 61 20 43 20 | = "This| is a C |
|00001410| 73 74 72 69 6e 67 22 0d | 09 70 53 74 72 69 6e 67 |string".|.pString|
|00001420| 32 20 3d 20 22 5c 70 54 | 68 69 73 20 69 73 20 61 |2 = "\pT|his is a|
|00001430| 20 50 61 73 63 61 6c 20 | 73 74 72 69 6e 67 22 0d | Pascal |string".|
|00001440| 54 68 65 20 66 69 72 73 | 74 20 6c 69 6e 65 20 77 |The firs|t line w|
|00001450| 69 6c 6c 20 63 72 65 61 | 74 65 20 61 20 43 2c 20 |ill crea|te a C, |
|00001460| 6e 75 6c 6c 20 74 65 72 | 6d 69 6e 61 74 65 64 2c |null ter|minated,|
|00001470| 20 73 74 72 69 6e 67 2c | 20 77 68 69 6c 65 20 74 | string,| while t|
|00001480| 68 65 20 73 65 63 6f 6e | 64 20 6c 69 6e 65 20 77 |he secon|d line w|
|00001490| 69 6c 6c 20 63 72 65 61 | 74 65 20 61 20 50 61 73 |ill crea|te a Pas|
|000014a0| 63 61 6c 2c 20 70 72 65 | 63 65 64 65 64 20 62 79 |cal, pre|ceded by|
|000014b0| 20 61 20 6c 65 6e 67 74 | 68 20 62 79 74 65 2c 20 | a lengt|h byte, |
|000014c0| 73 74 72 69 6e 67 2e 0d | 46 75 72 74 68 65 72 20 |string..|Further |
|000014d0| 52 65 66 65 72 65 6e 63 | 65 3a 0d a5 09 4d 50 57 |Referenc|e:...MPW|
|000014e0| 20 43 20 4d 61 6e 75 61 | 6c 2c 20 41 70 70 65 6e | C Manua|l, Appen|
|000014f0| 64 69 78 20 48 3a 0d a5 | 09 d2 46 75 6e 63 74 69 |dix H:..|..Functi|
|00001500| 6f 6e 73 20 55 73 69 6e | 67 20 53 74 72 69 6e 67 |ons Usin|g String|
|00001510| 73 20 6f 72 20 50 6f 69 | 6e 74 73 20 61 73 20 50 |s or Poi|nts as P|
|00001520| 61 72 61 6d 65 74 65 72 | 73 d3 0d 50 54 20 33 20 |arameter|s..PT 3 |
|00001530| 2d 20 45 64 69 74 20 46 | 69 6c 65 20 46 6f 72 6d |- Edit F|ile Form|
|00001540| 61 74 0d 50 6c 61 74 66 | 6f 72 6d 73 20 26 20 54 |at.Platf|orms & T|
|00001550| 6f 6f 6c 73 09 0d 52 65 | 76 69 73 65 64 20 62 79 |ools..Re|vised by|
|00001560| 3a 09 42 72 79 61 6e 20 | 4a 6f 68 6e 73 6f 6e 09 |:.Bryan |Johnson.|
|00001570| 41 75 67 75 73 74 20 31 | 39 38 36 0d 09 09 09 4d |August 1|986....M|
|00001580| 61 72 63 68 20 31 39 38 | 38 0d 57 72 69 74 74 65 |arch 198|8.Writte|
|00001590| 6e 20 62 79 3a 09 48 61 | 72 76 65 79 20 41 6c 63 |n by:.Ha|rvey Alc|
|000015a0| 61 62 65 73 09 41 70 72 | 69 6c 20 31 39 38 35 0d |abes.Apr|il 1985.|
|000015b0| 54 68 69 73 20 74 65 63 | 68 6e 69 63 61 6c 20 6e |This tec|hnical n|
|000015c0| 6f 74 65 20 64 65 73 63 | 72 69 62 65 73 20 74 68 |ote desc|ribes th|
|000015d0| 65 20 66 6f 72 6d 61 74 | 20 6f 66 20 74 68 65 20 |e format| of the |
|000015e0| 66 69 6c 65 73 20 63 72 | 65 61 74 65 64 20 62 79 |files cr|eated by|
|000015f0| 20 45 64 69 74 2e 20 49 | 74 20 68 61 73 20 62 65 | Edit. I|t has be|
|00001600| 65 6e 20 76 65 72 69 66 | 69 65 64 20 66 6f 72 20 |en verif|ied for |
|00001610| 76 65 72 73 69 6f 6e 73 | 20 31 2e 78 20 61 6e 64 |versions| 1.x and|
|00001620| 20 32 2e 30 2e 0d 45 64 | 69 74 2c 20 61 20 74 65 | 2.0..Ed|it, a te|
|00001630| 78 74 20 65 64 69 74 6f | 72 20 6c 69 63 65 6e 73 |xt edito|r licens|
|00001640| 65 64 20 62 79 20 41 70 | 70 6c 65 20 61 6e 64 20 |ed by Ap|ple and |
|00001650| 69 6e 63 6c 75 64 65 64 | 20 69 6e 20 74 68 65 20 |included| in the |
|00001660| 43 6f 6e 73 75 6c 61 69 | 72 20 36 38 30 30 30 20 |Consulai|r 68000 |
|00001670| 44 65 76 65 6c 6f 70 6d | 65 6e 74 20 53 79 73 74 |Developm|ent Syst|
|00001680| 65 6d 2c 20 63 61 6e 20 | 72 65 61 64 20 61 6e 79 |em, can |read any|
|00001690| 20 74 65 78 74 2d 6f 6e | 6c 79 20 66 69 6c 65 20 | text-on|ly file |
|000016a0| 77 68 6f 73 65 20 66 69 | 6c 65 20 74 79 70 65 20 |whose fi|le type |
|000016b0| 69 73 20 54 45 58 54 2e | 20 46 69 6c 65 73 20 63 |is TEXT.| Files c|
|000016c0| 72 65 61 74 65 64 20 62 | 79 20 45 64 69 74 20 68 |reated b|y Edit h|
|000016d0| 61 76 65 20 61 20 63 72 | 65 61 74 6f 72 20 49 44 |ave a cr|eator ID|
|000016e0| 20 6f 66 20 45 44 49 54 | 2e 20 45 64 69 74 20 69 | of EDIT|. Edit i|
|000016f0| 73 20 61 20 64 69 73 6b | 2d 62 61 73 65 64 20 65 |s a disk|-based e|
|00001700| 64 69 74 6f 72 20 73 6f | 20 74 68 65 20 66 69 6c |ditor so| the fil|
|00001710| 65 20 6c 65 6e 67 74 68 | 20 69 73 20 6e 6f 74 20 |e length| is not |
|00001720| 6c 69 6d 69 74 65 64 20 | 62 79 20 61 76 61 69 6c |limited |by avail|
|00001730| 61 62 6c 65 20 6d 65 6d | 6f 72 79 2e 20 46 69 6c |able mem|ory. Fil|
|00001740| 65 73 20 63 72 65 61 74 | 65 64 20 6f 72 20 6d 6f |es creat|ed or mo|
|00001750| 64 69 66 69 65 64 20 62 | 79 20 45 64 69 74 2c 20 |dified b|y Edit, |
|00001760| 68 61 76 65 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |have the| format |
|00001770| 64 65 73 63 72 69 62 65 | 64 20 62 65 6c 6f 77 3b |describe|d below;|
|00001780| 20 69 66 20 74 68 65 79 | 20 61 72 65 20 6e 6f 74 | if they| are not|
|00001790| 20 74 6f 6f 20 6c 6f 6e | 67 20 74 68 65 79 20 63 | too lon|g they c|
|000017a0| 61 6e 20 62 65 20 72 65 | 61 64 20 62 79 20 61 6e |an be re|ad by an|
|000017b0| 79 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 77 68 |y applic|ation wh|
|000017c0| 69 63 68 20 63 61 6e 20 | 72 65 61 64 20 54 45 58 |ich can |read TEX|
|000017d0| 54 20 66 69 6c 65 73 20 | 28 65 67 3a 20 4d 61 63 |T files |(eg: Mac|
|000017e0| 57 72 69 74 65 2c 20 4d | 69 63 72 6f 73 6f 66 74 |Write, M|icrosoft|
|000017f0| 20 57 6f 72 64 2c 20 6f | 72 20 74 68 65 20 41 50 | Word, o|r the AP|
|00001800| 44 41 20 65 78 61 6d 70 | 6c 65 20 70 72 6f 67 72 |DA examp|le progr|
|00001810| 61 6d 20 46 69 6c 65 29 | 2e 0d 09 54 68 65 20 64 |am File)|...The d|
|00001820| 61 74 61 20 66 6f 72 6b | 20 63 6f 6e 74 61 69 6e |ata fork| contain|
|00001830| 73 20 74 65 78 74 20 28 | 41 53 43 49 49 20 63 68 |s text (|ASCII ch|
|00001840| 61 72 61 63 74 65 72 73 | 29 2e 20 43 61 72 72 69 |aracters|). Carri|
|00001850| 61 67 65 20 72 65 74 75 | 72 6e 20 63 68 61 72 61 |age retu|rn chara|
|00001860| 63 74 65 72 73 20 69 6e | 64 69 63 61 74 65 20 6c |cters in|dicate l|
|00001870| 69 6e 65 20 0d 09 62 72 | 65 61 6b 73 3b 20 74 61 |ine ..br|eaks; ta|
|00001880| 62 20 63 68 61 72 61 63 | 74 65 72 73 20 61 72 65 |b charac|ters are|
|00001890| 20 64 69 73 70 6c 61 79 | 65 64 20 61 73 20 64 65 | display|ed as de|
|000018a0| 73 63 72 69 62 65 64 20 | 62 65 6c 6f 77 2e 20 4e |scribed |below. N|
|000018b0| 6f 20 6f 74 68 65 72 20 | 63 68 61 72 61 63 74 65 |o other |characte|
|000018c0| 72 73 20 68 61 76 65 09 | 73 70 65 63 69 61 6c 20 |rs have.|special |
|000018d0| 20 73 69 67 6e 69 66 69 | 63 61 6e 63 65 2e 0d 09 | signifi|cance...|
|000018e0| 54 68 65 20 72 65 73 6f | 75 72 63 65 20 66 6f 72 |The reso|urce for|
|000018f0| 6b 20 63 6f 6e 74 61 69 | 6e 73 20 72 65 73 6f 75 |k contai|ns resou|
|00001900| 72 63 65 73 20 6f 66 20 | 74 79 70 65 20 45 54 41 |rces of |type ETA|
|00001910| 42 20 61 6e 64 20 45 46 | 4e 54 2e 20 49 66 20 45 |B and EF|NT. If E|
|00001920| 64 69 74 20 6f 70 65 6e | 73 20 61 20 74 65 78 74 |dit open|s a text|
|00001930| 2d 0d 09 6f 6e 6c 79 20 | 20 66 69 6c 65 20 74 68 |-..only | file th|
|00001940| 61 74 20 64 6f 65 73 20 | 6e 6f 74 20 68 61 76 65 |at does |not have|
|00001950| 20 74 68 65 73 65 20 72 | 65 73 6f 75 72 63 65 73 | these r|esources|
|00001960| 20 69 74 20 77 69 6c 6c | 20 61 64 64 20 74 68 65 | it will| add the|
|00001970| 6d 2e 0d 09 54 68 65 20 | 45 54 41 42 20 28 45 64 |m...The |ETAB (Ed|
|00001980| 69 74 6f 72 20 54 41 42 | 29 20 72 65 73 6f 75 72 |itor TAB|) resour|
|00001990| 63 65 2c 20 72 65 73 6f | 75 72 63 65 20 49 44 20 |ce, reso|urce ID |
|000019a0| 31 30 30 34 2c 20 63 6f | 6e 74 61 69 6e 73 20 74 |1004, co|ntains t|
|000019b0| 77 6f 20 69 6e 74 65 67 | 65 72 73 2e 20 54 68 65 |wo integ|ers. The|
|000019c0| 20 66 69 72 73 74 20 69 | 73 20 0d 09 74 68 65 20 | first i|s ..the |
|000019d0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 69 78 65 6c | number |of pixel|
|000019e0| 73 20 74 6f 20 64 69 73 | 70 6c 61 79 20 66 6f 72 |s to dis|play for|
|000019f0| 20 65 61 63 68 20 73 70 | 61 63 65 20 77 69 74 68 | each sp|ace with|
|00001a00| 69 6e 20 61 20 74 61 62 | 20 28 6e 6f 74 20 6e 65 |in a tab| (not ne|
|00001a10| 63 65 73 73 61 72 69 6c | 79 20 74 68 65 20 73 61 |cessaril|y the sa|
|00001a20| 6d 65 20 61 73 09 66 6f | 72 20 74 68 65 20 73 70 |me as.fo|r the sp|
|00001a30| 61 63 65 20 63 68 61 72 | 61 63 74 65 72 29 2e 20 |ace char|acter). |
|00001a40| 54 68 65 20 73 65 63 6f | 6e 64 20 69 6e 74 65 67 |The seco|nd integ|
|00001a50| 65 72 20 69 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |er is th|e number|
|00001a60| 20 6f 66 20 74 68 65 73 | 65 20 73 70 61 63 65 73 | of thes|e spaces|
|00001a70| 20 77 68 69 63 68 20 77 | 69 6c 6c 20 0d 09 62 65 | which w|ill ..be|
|00001a80| 20 64 69 73 70 6c 61 79 | 65 64 20 20 66 6f 72 20 | display|ed for |
|00001a90| 65 61 63 68 20 74 61 62 | 20 63 68 61 72 61 63 74 |each tab| charact|
|00001aa0| 65 72 2e 0d 09 54 68 65 | 20 45 46 4e 54 20 28 45 |er...The| EFNT (E|
|00001ab0| 64 69 74 6f 72 20 46 6f | 4e 54 29 20 72 65 73 6f |ditor Fo|NT) reso|
|00001ac0| 75 72 63 65 2c 20 72 65 | 73 6f 75 72 63 65 20 49 |urce, re|source I|
|00001ad0| 44 20 31 30 30 33 2c 20 | 63 6f 6e 74 61 69 6e 73 |D 1003, |contains|
|00001ae0| 20 61 6e 20 69 6e 74 65 | 67 65 72 20 66 6f 6c 6c | an inte|ger foll|
|00001af0| 6f 77 65 64 20 62 79 20 | 0d 09 61 20 20 50 61 73 |owed by |..a Pas|
|00001b00| 63 61 6c 20 73 74 72 69 | 6e 67 20 28 6c 65 6e 67 |cal stri|ng (leng|
|00001b10| 74 68 20 62 79 74 65 20 | 66 6f 6c 6c 6f 77 65 64 |th byte |followed|
|00001b20| 20 62 79 20 63 68 61 72 | 61 63 74 65 72 73 29 2e | by char|acters).|
|00001b30| 20 54 68 65 20 69 6e 74 | 65 67 65 72 20 69 73 20 | The int|eger is |
|00001b40| 74 68 65 20 70 6f 69 6e | 74 20 73 69 7a 65 20 6f |the poin|t size o|
|00001b50| 66 20 74 68 65 20 0d 09 | 64 6f 63 75 6d 65 6e 74 |f the ..|document|
|00001b60| d5 73 20 66 6f 6e 74 2e | 20 54 68 65 20 73 74 72 |.s font.| The str|
|00001b70| 69 6e 67 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ing cont|ains the|
|00001b80| 20 66 6f 6e 74 20 6e 61 | 6d 65 2e 20 49 66 20 74 | font na|me. If t|
|00001b90| 68 65 20 73 74 72 69 6e | 67 20 73 69 7a 65 20 28 |he strin|g size (|
|00001ba0| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 65 20 0d 09 |includin|g the ..|
|00001bb0| 6c 65 6e 67 74 68 20 62 | 79 74 65 29 20 69 73 20 |length b|yte) is |
|00001bc0| 6f 64 64 2c 20 61 6e 20 | 65 78 74 72 61 20 62 79 |odd, an |extra by|
|00001bd0| 74 65 20 69 73 20 61 64 | 64 65 64 20 73 6f 20 74 |te is ad|ded so t|
|00001be0| 68 61 74 20 74 68 65 20 | 72 65 73 6f 75 72 63 65 |hat the |resource|
|00001bf0| 20 73 69 7a 65 20 69 73 | 20 65 76 65 6e 2e 0d 46 | size is| even..F|
|00001c00| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|00001c10| 69 6f 6e 20 61 62 6f 75 | 74 20 45 64 69 74 2c 20 |ion abou|t Edit, |
|00001c20| 63 6f 6e 74 61 63 74 3a | 0d 09 43 6f 6e 73 75 6c |contact:|..Consul|
|00001c30| 61 69 72 20 43 6f 72 70 | 2e 0d 09 31 34 30 20 43 |air Corp|...140 C|
|00001c40| 61 6d 70 6f 20 44 72 69 | 76 65 0d 09 50 6f 72 74 |ampo Dri|ve..Port|
|00001c50| 6f 6c 61 20 56 61 6c 6c | 65 79 2c 20 43 41 20 20 |ola Vall|ey, CA |
|00001c60| 39 34 30 32 35 0d 09 28 | 34 31 35 29 20 38 35 31 |94025..(|415) 851|
|00001c70| 2d 33 32 37 32 0d 50 54 | 20 34 20 2d 20 d2 42 75 |-3272.PT| 4 - .Bu|
|00001c80| 67 73 20 49 6e 20 4d 61 | 63 41 70 70 3f 20 20 59 |gs In Ma|cApp? Y|
|00001c90| 65 73 2c 20 42 75 74 20 | 49 20 4c 6f 76 65 20 49 |es, But |I Love I|
|00001ca0| 74 21 d3 0d 50 6c 61 74 | 66 6f 72 6d 73 20 26 20 |t!..Plat|forms & |
|00001cb0| 54 6f 6f 6c 73 09 0d 52 | 65 76 69 73 65 64 20 62 |Tools..R|evised b|
|00001cc0| 79 3a 09 4b 65 69 74 68 | 20 52 6f 6c 6c 69 6e 09 |y:.Keith| Rollin.|
|00001cd0| 4f 63 74 6f 62 65 72 20 | 31 39 39 30 0d 57 72 69 |October |1990.Wri|
|00001ce0| 74 74 65 6e 20 62 79 3a | 09 4b 65 69 74 68 20 52 |tten by:|.Keith R|
|00001cf0| 6f 6c 6c 69 6e 2c 20 4e | 2e 20 4c 69 6e 64 65 6e |ollin, N|. Linden|
|00001d00| 62 65 72 67 2c 20 74 68 | 65 20 4d 61 63 41 70 70 |berg, th|e MacApp|
|00001d10| 20 45 6e 67 69 6e 65 65 | 72 73 2c 20 61 6e 64 20 | Enginee|rs, and |
|00001d20| 59 6f 75 09 41 75 67 75 | 73 74 20 31 39 39 30 0d |You.Augu|st 1990.|
|00001d30| 54 68 69 73 20 54 65 63 | 68 6e 69 63 61 6c 20 4e |This Tec|hnical N|
|00001d40| 6f 74 65 20 64 65 73 63 | 72 69 62 65 73 20 74 68 |ote desc|ribes th|
|00001d50| 65 20 6c 61 74 65 73 74 | 20 69 6e 66 6f 72 6d 61 |e latest| informa|
|00001d60| 74 69 6f 6e 20 61 62 6f | 75 74 20 62 75 67 73 20 |tion abo|ut bugs |
|00001d70| 6f 72 20 75 6e 65 78 70 | 65 63 74 65 64 20 d2 66 |or unexp|ected .f|
|00001d80| 65 61 74 75 72 65 73 d3 | 20 69 6e 20 4d 61 63 41 |eatures.| in MacA|
|00001d90| 70 70 2e 20 20 57 68 65 | 72 65 20 70 6f 73 73 69 |pp. Whe|re possi|
|00001da0| 62 6c 65 2c 20 73 6f 6c | 75 74 69 6f 6e 73 20 61 |ble, sol|utions a|
|00001db0| 6e 64 20 66 69 78 65 73 | 20 61 72 65 20 6e 6f 74 |nd fixes| are not|
|00001dc0| 65 64 2e 20 20 44 54 53 | 20 69 6e 74 65 6e 64 73 |ed. DTS| intends|
|00001dd0| 20 74 68 69 73 20 4e 6f | 74 65 20 74 6f 20 62 65 | this No|te to be|
|00001de0| 20 61 20 63 6f 6d 70 6c | 65 74 65 20 6c 69 73 74 | a compl|ete list|
|00001df0| 20 6f 66 20 61 6c 6c 20 | 6b 6e 6f 77 6e 20 62 75 | of all |known bu|
|00001e00| 67 73 20 69 6e 20 4d 61 | 63 41 70 70 20 61 6e 64 |gs in Ma|cApp and|
|00001e10| 20 77 69 6c 6c 20 75 70 | 64 61 74 65 20 69 74 20 | will up|date it |
|00001e20| 61 73 20 6f 6c 64 20 62 | 75 67 73 20 61 72 65 20 |as old b|ugs are |
|00001e30| 66 69 78 65 64 20 6f 72 | 20 6e 65 77 20 6f 6e 65 |fixed or| new one|
|00001e40| 73 20 61 70 70 65 61 72 | 2e 20 20 49 66 20 79 6f |s appear|. If yo|
|00001e50| 75 20 68 61 76 65 20 65 | 6e 63 6f 75 6e 74 65 72 |u have e|ncounter|
|00001e60| 65 64 20 61 20 62 75 67 | 20 6f 72 20 75 6e 65 78 |ed a bug| or unex|
|00001e70| 70 65 63 74 65 64 20 66 | 65 61 74 75 72 65 20 77 |pected f|eature w|
|00001e80| 68 69 63 68 20 69 73 20 | 6e 6f 74 20 64 65 73 63 |hich is |not desc|
|00001e90| 72 69 62 65 64 20 68 65 | 72 65 2c 20 62 65 20 73 |ribed he|re, be s|
|00001ea0| 75 72 65 20 74 6f 20 6c | 65 74 20 44 54 53 20 6b |ure to l|et DTS k|
|00001eb0| 6e 6f 77 2e 20 20 53 70 | 65 63 69 66 69 63 20 63 |now. Sp|ecific c|
|00001ec0| 6f 64 65 20 65 78 61 6d | 70 6c 65 73 20 61 6e 64 |ode exam|ples and|
|00001ed0| 20 73 75 67 67 65 73 74 | 65 64 20 66 69 78 65 73 | suggest|ed fixes|
|00001ee0| 20 61 72 65 20 75 73 65 | 66 75 6c 2e 0d 54 68 69 | are use|ful..Thi|
|00001ef0| 73 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |s versio|n of the|
|00001f00| 20 4e 6f 74 65 20 72 65 | 66 6c 65 63 74 73 20 74 | Note re|flects t|
|00001f10| 68 65 20 73 74 61 74 65 | 20 6f 66 20 4d 61 63 41 |he state| of MacA|
|00001f20| 70 70 20 32 2e 30 2e 31 | 2e 20 54 68 65 20 6c 61 |pp 2.0.1|. The la|
|00001f30| 74 65 73 74 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |test ver|sion of |
|00001f40| 74 68 69 73 20 4e 6f 74 | 65 20 63 61 6e 20 61 6c |this Not|e can al|
|00001f50| 77 61 79 73 20 62 65 20 | 66 6f 75 6e 64 20 6f 6e |ways be |found on|
|00001f60| 20 41 70 70 6c 65 4c 69 | 6e 6b 20 69 6e 20 74 68 | AppleLi|nk in th|
|00001f70| 65 20 44 65 76 65 6c 6f | 70 65 72 20 53 65 72 76 |e Develo|per Serv|
|00001f80| 69 63 65 73 20 42 75 6c | 6c 65 74 69 6e 20 42 6f |ices Bul|letin Bo|
|00001f90| 61 72 64 2e 0d 43 68 61 | 6e 67 65 73 20 73 69 6e |ard..Cha|nges sin|
|00001fa0| 63 65 20 41 75 67 75 73 | 74 20 31 39 39 30 3a 20 |ce Augus|t 1990: |
|00001fb0| 55 70 64 61 74 65 64 20 | 66 6f 72 20 4d 61 63 41 |Updated |for MacA|
|00001fc0| 70 70 20 32 2e 30 2e 31 | 2e 20 52 65 76 69 73 65 |pp 2.0.1|. Revise|
|00001fd0| 64 20 6c 69 6e 65 20 63 | 6f 75 6e 74 20 6f 66 20 |d line c|ount of |
|00001fe0| 4d 61 63 41 70 70 20 32 | 2e 30 2e 0d 41 64 64 65 |MacApp 2|.0..Adde|
|00001ff0| 64 3a 09 54 45 64 69 74 | 54 65 78 74 20 23 32 3b |d:.TEdit|Text #2;|
|00002000| 20 54 45 76 74 48 61 6e | 64 6c 65 72 20 23 31 3b | TEvtHan|dler #1;|
|00002010| 20 54 47 72 69 64 56 69 | 65 77 20 23 33 3b 20 54 | TGridVi|ew #3; T|
|00002020| 54 45 56 69 65 77 20 23 | 35 2c 20 37 2c 20 39 3b |TEView #|5, 7, 9;|
|00002030| 20 54 56 69 65 77 20 23 | 36 3b 20 41 73 73 6f 72 | TView #|6; Assor|
|00002040| 74 65 64 20 54 56 69 65 | 77 2e 46 6f 63 75 73 20 |ted TVie|w.Focus |
|00002050| 23 38 3b 20 47 6c 6f 62 | 61 6c 73 20 23 31 36 3b |#8; Glob|als #16;|
|00002060| 20 4d 41 42 75 69 6c 64 | 20 23 31 33 3b 20 44 65 | MABuild| #13; De|
|00002070| 62 75 67 20 23 31 30 2e | 0d 55 70 64 61 74 65 64 |bug #10.|.Updated|
|00002080| 3a 09 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 20 23 |:.TAppli|cation #|
|00002090| 33 3b 20 54 50 6f 70 75 | 70 20 23 35 3b 20 54 53 |3; TPopu|p #5; TS|
|000020a0| 63 72 6f 6c 6c 65 72 20 | 23 31 3b 20 54 53 74 64 |croller |#1; TStd|
|000020b0| 50 72 69 6e 74 48 61 6e | 64 6c 65 72 20 23 32 2c |PrintHan|dler #2,|
|000020c0| 20 33 3b 20 54 54 45 56 | 69 65 77 20 23 33 3b 20 | 3; TTEV|iew #3; |
|000020d0| 54 56 69 65 77 20 23 33 | 3b 20 54 57 69 6e 64 6f |TView #3|; TWindo|
|000020e0| 77 20 23 33 3b 20 41 73 | 73 6f 72 74 65 64 20 54 |w #3; As|sorted T|
|000020f0| 56 69 65 77 2e 46 6f 63 | 75 73 20 23 33 3b 20 47 |View.Foc|us #3; G|
|00002100| 6c 6f 62 61 6c 73 20 23 | 37 2c 20 38 3b 20 4d 41 |lobals #|7, 8; MA|
|00002110| 42 75 69 6c 64 20 23 32 | 2c 20 31 31 3b 20 44 65 |Build #2|, 11; De|
|00002120| 62 75 67 20 23 34 2c 20 | 35 3b 20 53 41 44 45 20 |bug #4, |5; SADE |
|00002130| 43 6f 6d 70 61 74 69 62 | 69 6c 69 74 79 20 23 31 |Compatib|ility #1|
|00002140| 3b 20 54 48 49 4e 4b 20 | 50 61 73 63 61 6c 20 23 |; THINK |Pascal #|
|00002150| 32 2e 0d 52 65 6d 6f 76 | 65 64 3a 09 54 41 70 70 |2..Remov|ed:.TApp|
|00002160| 6c 69 63 61 74 69 6f 6e | 20 23 35 3b 20 54 43 6f |lication| #5; TCo|
|00002170| 6d 6d 61 6e 64 20 23 31 | 3b 20 54 43 74 6c 4d 67 |mmand #1|; TCtlMg|
|00002180| 72 20 23 31 3b 20 54 44 | 65 73 6b 53 63 72 61 70 |r #1; TD|eskScrap|
|00002190| 56 69 65 77 20 23 31 3b | 20 54 47 72 69 64 56 69 |View #1;| TGridVi|
|000021a0| 65 77 20 23 32 3b 20 54 | 49 63 6f 6e 20 23 31 3b |ew #2; T|Icon #1;|
|000021b0| 20 54 50 6f 70 75 70 20 | 23 31 2c 20 32 2c 20 33 | TPopup |#1, 2, 3|
|000021c0| 3b 20 54 53 74 64 50 72 | 69 6e 74 48 61 6e 64 6c |; TStdPr|intHandl|
|000021d0| 65 72 20 23 34 3b 20 54 | 54 45 56 69 65 77 20 23 |er #4; T|TEView #|
|000021e0| 31 2c 20 32 2c 20 36 2c | 20 38 3b 20 54 56 69 65 |1, 2, 6,| 8; TVie|
|000021f0| 77 20 23 35 3b 20 54 57 | 69 6e 64 6f 77 20 23 31 |w #5; TW|indow #1|
|00002200| 2c 20 32 3b 20 41 73 73 | 6f 72 74 65 64 20 54 56 |, 2; Ass|orted TV|
|00002210| 69 65 77 2e 46 6f 63 75 | 73 20 23 37 3b 20 47 6c |iew.Focu|s #7; Gl|
|00002220| 6f 62 61 6c 73 20 23 31 | 2d 35 2c 20 39 2c 20 31 |obals #1|-5, 9, 1|
|00002230| 33 2d 31 35 3b 20 44 65 | 62 75 67 20 23 38 2c 20 |3-15; De|bug #8, |
|00002240| 39 3b 20 54 48 49 4e 4b | 20 50 61 73 63 61 6c 20 |9; THINK| Pascal |
|00002250| 23 31 3b 20 4f 74 68 65 | 72 20 23 32 2e 0d 54 68 |#1; Othe|r #2..Th|
|00002260| 65 20 4d 61 63 41 70 70 | 20 4d 61 6e 61 67 65 6d |e MacApp| Managem|
|00002270| 65 6e 74 20 77 6f 75 6c | 64 20 6c 69 6b 65 20 74 |ent woul|d like t|
|00002280| 6f 20 6e 6f 74 65 20 74 | 68 61 74 20 4d 61 63 41 |o note t|hat MacA|
|00002290| 70 70 20 69 73 20 61 20 | 68 69 67 68 20 76 65 6c |pp is a |high vel|
|000022a0| 6f 63 69 74 79 20 72 69 | 64 65 20 77 69 74 68 20 |ocity ri|de with |
|000022b0| 6d 61 6e 79 20 74 77 69 | 73 74 73 20 61 6e 64 20 |many twi|sts and |
|000022c0| 74 75 72 6e 73 20 28 61 | 6c 6c 20 61 6c 69 6b 65 |turns (a|ll alike|
|000022d0| 29 2e 20 20 50 6c 65 61 | 73 65 20 6b 65 65 70 20 |). Plea|se keep |
|000022e0| 79 6f 75 72 20 68 61 6e | 64 73 20 69 6e 73 69 64 |your han|ds insid|
|000022f0| 65 20 61 74 20 61 6c 6c | 20 74 69 6d 65 73 2e 0d |e at all| times..|
|00002300| 54 68 65 72 65 20 61 72 | 65 20 31 30 37 2c 37 34 |There ar|e 107,74|
|00002310| 34 20 6c 69 6e 65 73 20 | 6f 66 20 4f 62 6a 65 63 |4 lines |of Objec|
|00002320| 74 20 50 61 73 63 61 6c | 2c 20 43 2b 2b 2c 20 41 |t Pascal|, C++, A|
|00002330| 73 73 65 6d 62 6c 79 2c | 20 61 6e 64 20 52 65 7a |ssembly,| and Rez|
|00002340| 20 63 6f 64 65 20 74 68 | 61 74 20 67 6f 20 69 6e | code th|at go in|
|00002350| 74 6f 20 74 68 65 20 4d | 61 63 41 70 70 20 4c 69 |to the M|acApp Li|
|00002360| 62 72 61 72 79 20 61 6e | 64 20 42 75 69 6c 64 20 |brary an|d Build |
|00002370| 73 79 73 74 65 6d 2e 20 | 20 41 73 20 73 75 63 68 |system. | As such|
|00002380| 2c 20 69 74 20 69 73 20 | 69 6e 65 76 69 74 61 62 |, it is |inevitab|
|00002390| 6c 65 20 74 68 61 74 20 | 61 20 66 65 77 20 62 75 |le that |a few bu|
|000023a0| 67 73 20 63 72 65 65 70 | 20 69 6e 2e 20 20 54 68 |gs creep| in. Th|
|000023b0| 65 20 70 75 72 70 6f 73 | 65 20 6f 66 20 74 68 69 |e purpos|e of thi|
|000023c0| 73 20 4e 6f 74 65 20 69 | 73 20 74 6f 20 69 6e 66 |s Note i|s to inf|
|000023d0| 6f 72 6d 20 79 6f 75 20 | 6f 66 20 74 68 65 73 65 |orm you |of these|
|000023e0| 20 62 75 67 73 2c 20 6e | 6f 74 20 74 6f 20 73 63 | bugs, n|ot to sc|
|000023f0| 61 72 65 20 79 6f 75 20 | 61 77 61 79 20 66 72 6f |are you |away fro|
|00002400| 6d 20 4d 61 63 41 70 70 | 2e 20 20 54 68 65 72 65 |m MacApp|. There|
|00002410| 20 61 72 65 20 64 6f 7a | 65 6e 73 20 6f 66 20 63 | are doz|ens of c|
|00002420| 6f 6d 6d 65 72 63 69 61 | 6c 6c 79 20 61 76 61 69 |ommercia|lly avai|
|00002430| 6c 61 62 6c 65 20 70 72 | 6f 67 72 61 6d 73 20 74 |lable pr|ograms t|
|00002440| 68 61 74 20 6c 65 61 64 | 20 6e 6f 72 6d 61 6c 20 |hat lead| normal |
|00002450| 65 76 65 72 79 64 61 79 | 20 6c 69 76 65 73 20 77 |everyday| lives w|
|00002460| 68 69 63 68 20 61 72 65 | 20 62 75 69 6c 74 20 6f |hich are| built o|
|00002470| 6e 20 74 6f 70 20 6f 66 | 20 4d 61 63 41 70 70 20 |n top of| MacApp |
|00002480| 61 73 20 69 74 20 73 74 | 61 6e 64 73 20 74 6f 64 |as it st|ands tod|
|00002490| 61 79 2e 20 20 4d 6f 73 | 74 20 6f 66 20 74 68 65 |ay. Mos|t of the|
|000024a0| 20 62 75 67 73 20 6c 69 | 73 74 65 64 20 68 65 72 | bugs li|sted her|
|000024b0| 65 20 64 6f 20 6e 6f 74 | 20 73 68 6f 77 20 75 70 |e do not| show up|
|000024c0| 20 69 6e 20 72 65 67 75 | 6c 61 72 20 75 73 65 20 | in regu|lar use |
|000024d0| 28 61 74 20 6c 65 61 73 | 74 2c 20 74 68 65 79 20 |(at leas|t, they |
|000024e0| 64 6f 6e d5 74 20 69 6e | 20 6f 75 72 20 74 65 73 |don.t in| our tes|
|000024f0| 74 20 70 72 6f 67 72 61 | 6d 73 29 2c 20 73 6f 20 |t progra|ms), so |
|00002500| 74 68 65 79 20 6d 61 79 | 20 6e 6f 74 20 61 66 66 |they may| not aff|
|00002510| 65 63 74 20 79 6f 75 2e | 20 49 66 20 74 68 65 79 |ect you.| If they|
|00002520| 20 64 6f 2c 20 79 6f 75 | 20 63 61 6e 20 75 73 65 | do, you| can use|
|00002530| 20 74 68 65 20 66 69 78 | 65 73 20 6f 72 20 73 6f | the fix|es or so|
|00002540| 6c 75 74 69 6f 6e 73 20 | 69 64 65 6e 74 69 66 69 |lutions |identifi|
|00002550| 65 64 20 68 65 72 65 20 | 28 d2 46 69 78 65 73 d3 |ed here |(.Fixes.|
|00002560| 20 61 72 65 20 69 6e 74 | 65 6e 64 65 64 20 74 6f | are int|ended to|
|00002570| 20 62 65 20 61 70 70 6c | 69 65 64 20 64 69 72 65 | be appl|ied dire|
|00002580| 63 74 6c 79 20 74 6f 20 | 74 68 65 20 4d 61 63 41 |ctly to |the MacA|
|00002590| 70 70 20 73 6f 75 72 63 | 65 2c 20 77 68 69 6c 65 |pp sourc|e, while|
|000025a0| 20 d2 73 6f 6c 75 74 69 | 6f 6e 73 d3 20 69 64 65 | .soluti|ons. ide|
|000025b0| 6e 74 69 66 79 20 74 65 | 63 68 6e 69 71 75 65 73 |ntify te|chniques|
|000025c0| 20 74 6f 20 6f 76 65 72 | 72 69 64 65 20 6f 72 20 | to over|ride or |
|000025d0| 61 76 6f 69 64 20 61 20 | 6d 65 74 68 6f 64 20 74 |avoid a |method t|
|000025e0| 68 65 20 70 72 6f 62 6c | 65 6d 29 2e 0d 4d 61 63 |he probl|em)..Mac|
|000025f0| 41 70 70 2e 4c 69 62 20 | 42 75 67 73 0d 54 41 70 |App.Lib |Bugs.TAp|
|00002600| 70 6c 69 63 61 74 69 6f | 6e 0d 31 2e 09 57 68 65 |plicatio|n.1..Whe|
|00002610| 6e 20 62 65 69 6e 67 20 | 73 75 73 70 65 6e 64 65 |n being |suspende|
|00002620| 64 20 69 6e 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |d in Mul|tiFinder|
|00002630| 2c 20 4d 61 63 41 70 70 | 20 63 6f 6d 6d 69 74 73 |, MacApp| commits|
|00002640| 20 63 6f 6d 6d 61 6e 64 | 20 6f 62 6a 65 63 74 73 | command| objects|
|00002650| 20 77 68 69 63 68 20 61 | 66 66 65 63 74 20 74 68 | which a|ffect th|
|00002660| 65 20 63 6c 69 70 62 6f | 61 72 64 2c 20 72 61 74 |e clipbo|ard, rat|
|00002670| 68 65 72 20 74 68 61 6e | 20 63 68 65 63 6b 69 6e |her than| checkin|
|00002680| 67 20 69 66 20 74 68 65 | 20 73 63 72 61 70 20 68 |g if the| scrap h|
|00002690| 61 73 20 63 68 61 6e 67 | 65 64 20 77 68 65 6e 20 |as chang|ed when |
|000026a0| 73 77 69 74 63 68 69 6e | 67 20 62 61 63 6b 20 69 |switchin|g back i|
|000026b0| 6e 2e 0d 53 6f 6c 75 74 | 69 6f 6e 3a 09 4e 6f 74 |n..Solut|ion:.Not|
|000026c0| 20 79 65 74 20 64 65 74 | 65 72 6d 69 6e 65 64 2e | yet det|ermined.|
|000026d0| 20 20 54 68 69 73 20 69 | 73 20 61 6e 20 61 72 65 | This i|s an are|
|000026e0| 61 20 6f 66 20 73 65 72 | 69 6f 75 73 20 63 6f 6e |a of ser|ious con|
|000026f0| 73 69 64 65 72 61 74 69 | 6f 6e 20 66 6f 72 20 74 |siderati|on for t|
|00002700| 68 65 20 6e 65 78 74 20 | 76 65 72 73 69 6f 6e 20 |he next |version |
|00002710| 6f 66 20 4d 61 63 41 70 | 70 2e 0d 32 2e 09 4d 61 |of MacAp|p..2..Ma|
|00002720| 63 41 70 70 20 73 68 6f | 75 6c 64 20 68 69 64 65 |cApp sho|uld hide|
|00002730| 20 74 68 65 20 63 6c 69 | 70 62 6f 61 72 64 20 77 | the cli|pboard w|
|00002740| 69 6e 64 6f 77 20 6f 6e | 20 61 20 73 75 73 70 65 |indow on| a suspe|
|00002750| 6e 64 20 65 76 65 6e 74 | 20 61 6e 64 20 72 65 64 |nd event| and red|
|00002760| 69 73 70 6c 61 79 20 69 | 74 20 6f 6e 20 61 20 72 |isplay i|t on a r|
|00002770| 65 73 75 6d 65 20 65 76 | 65 6e 74 2e 20 0d 53 6f |esume ev|ent. .So|
|00002780| 6c 75 74 69 6f 6e 3a 09 | 4f 76 65 72 72 69 64 65 |lution:.|Override|
|00002790| 20 74 68 65 20 54 41 70 | 70 6c 69 63 61 74 69 6f | the TAp|plicatio|
|000027a0| 6e 20 6d 65 74 68 6f 64 | 73 20 41 62 6f 75 74 54 |n method|s AboutT|
|000027b0| 6f 4c 6f 73 65 43 6f 6e | 74 72 6f 6c 20 61 6e 64 |oLoseCon|trol and|
|000027c0| 20 52 65 67 61 69 6e 43 | 6f 6e 74 72 6f 6c 2e 20 | RegainC|ontrol. |
|000027d0| 20 41 62 6f 75 74 54 6f | 4c 6f 73 65 43 6f 6e 74 | AboutTo|LoseCont|
|000027e0| 72 6f 6c 20 73 68 6f 75 | 6c 64 20 72 65 6d 65 6d |rol shou|ld remem|
|000027f0| 62 65 72 20 77 68 65 74 | 68 65 72 20 6f 72 20 6e |ber whet|her or n|
|00002800| 6f 74 20 74 68 65 20 63 | 6c 69 70 62 6f 61 72 64 |ot the c|lipboard|
|00002810| 20 77 69 6e 64 6f 77 20 | 69 73 20 63 75 72 72 65 | window |is curre|
|00002820| 6e 74 6c 79 20 6f 70 65 | 6e 20 61 6e 64 20 63 61 |ntly ope|n and ca|
|00002830| 6c 6c 20 67 43 6c 69 70 | 57 69 6e 64 6f 77 2e 43 |ll gClip|Window.C|
|00002840| 6c 6f 73 65 20 69 66 20 | 69 74 20 69 73 2e 20 20 |lose if |it is. |
|00002850| 52 65 67 61 69 6e 43 6f | 6e 74 72 6f 6c 20 73 68 |RegainCo|ntrol sh|
|00002860| 6f 75 6c 64 20 6c 6f 6f | 6b 20 61 74 20 74 68 65 |ould loo|k at the|
|00002870| 20 73 74 61 74 65 20 6f | 66 20 74 68 65 20 63 6c | state o|f the cl|
|00002880| 69 70 62 6f 61 72 64 20 | 77 69 6e 64 6f 77 20 73 |ipboard |window s|
|00002890| 61 76 65 64 20 62 79 20 | 41 62 6f 75 74 54 6f 4c |aved by |AboutToL|
|000028a0| 6f 73 65 43 6f 6e 74 72 | 6f 6c 2c 20 61 6e 64 20 |oseContr|ol, and |
|000028b0| 63 61 6c 6c 20 67 43 6c | 69 70 57 69 6e 64 6f 77 |call gCl|ipWindow|
|000028c0| 2e 4f 70 65 6e 20 69 66 | 20 74 68 65 20 77 69 6e |.Open if| the win|
|000028d0| 64 6f 77 20 6e 65 65 64 | 73 20 74 6f 20 62 65 20 |dow need|s to be |
|000028e0| 72 65 73 68 6f 77 6e 2e | 0d 33 2e 09 54 68 65 72 |reshown.|.3..Ther|
|000028f0| 65 20 61 72 65 20 70 72 | 6f 62 6c 65 6d 73 20 77 |e are pr|oblems w|
|00002900| 69 74 68 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |ith the |value of|
|00002910| 20 74 68 65 20 6d 6f 75 | 73 65 44 69 64 4d 6f 76 | the mou|seDidMov|
|00002920| 65 20 70 61 72 61 6d 65 | 74 65 72 20 74 6f 20 54 |e parame|ter to T|
|00002930| 43 6f 6d 6d 61 6e 64 20 | 77 68 65 6e 20 63 61 6c |Command |when cal|
|00002940| 6c 65 64 20 62 79 20 54 | 41 70 70 6c 69 63 61 74 |led by T|Applicat|
|00002950| 69 6f 6e 2e 54 72 61 63 | 6b 4d 6f 75 73 65 2e 20 |ion.Trac|kMouse. |
|00002960| 20 57 68 65 6e 20 74 68 | 65 20 54 72 61 63 6b 50 | When th|e TrackP|
|00002970| 68 61 73 65 20 69 73 20 | 74 72 61 63 6b 50 72 65 |hase is |trackPre|
|00002980| 73 73 2c 20 54 43 6f 6d | 6d 61 6e 64 2e 54 72 61 |ss, TCom|mand.Tra|
|00002990| 63 6b 4d 6f 75 73 65 20 | 69 73 20 63 61 6c 6c 65 |ckMouse |is calle|
|000029a0| 64 20 77 69 74 68 20 6d | 6f 75 73 65 44 69 64 4d |d with m|ouseDidM|
|000029b0| 6f 76 65 20 73 65 74 20 | 74 6f 20 54 52 55 45 20 |ove set |to TRUE |
|000029c0| 65 76 65 6e 20 74 68 6f | 75 67 68 20 74 68 65 20 |even tho|ugh the |
|000029d0| 6d 6f 75 73 65 20 68 61 | 73 6e d5 74 20 68 61 64 |mouse ha|sn.t had|
|000029e0| 20 61 20 63 68 61 6e 63 | 65 20 74 6f 20 6d 6f 76 | a chanc|e to mov|
|000029f0| 65 2e 20 20 57 68 65 6e | 20 74 68 65 20 54 72 61 |e. When| the Tra|
|00002a00| 63 6b 50 68 61 73 65 20 | 69 73 20 74 72 61 63 6b |ckPhase |is track|
|00002a10| 4d 6f 76 65 2c 20 6d 6f | 75 73 65 44 69 64 4d 6f |Move, mo|useDidMo|
|00002a20| 76 65 20 69 73 20 46 41 | 4c 53 45 20 77 68 65 6e |ve is FA|LSE when|
|00002a30| 65 76 65 72 20 74 68 65 | 20 6d 6f 75 73 65 20 6d |ever the| mouse m|
|00002a40| 6f 76 65 73 20 62 61 63 | 6b 20 69 6e 73 69 64 65 |oves bac|k inside|
|00002a50| 20 74 68 65 20 68 79 73 | 74 65 72 65 73 69 73 20 | the hys|teresis |
|00002a60| 72 61 6e 67 65 2e 20 20 | 57 68 65 6e 20 74 68 65 |range. |When the|
|00002a70| 20 54 72 61 63 6b 50 68 | 61 73 65 20 69 73 20 74 | TrackPh|ase is t|
|00002a80| 72 61 63 6b 52 65 6c 65 | 61 73 65 2c 20 6d 6f 75 |rackRele|ase, mou|
|00002a90| 73 65 44 69 64 4d 6f 76 | 65 20 69 73 20 54 52 55 |seDidMov|e is TRU|
|00002aa0| 45 20 65 76 65 6e 20 69 | 66 20 74 68 65 20 6d 6f |E even i|f the mo|
|00002ab0| 75 73 65 20 6e 65 76 65 | 72 20 6d 6f 76 65 64 2e |use neve|r moved.|
|00002ac0| 0d 46 69 78 3a 09 49 6e | 20 54 41 70 70 6c 69 63 |.Fix:.In| TApplic|
|00002ad0| 61 74 69 6f 6e 2e 54 72 | 61 63 6b 4d 6f 75 73 65 |ation.Tr|ackMouse|
|00002ae0| 20 28 66 69 6c 65 20 55 | 4d 61 63 41 70 70 2e 54 | (file U|MacApp.T|
|00002af0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 2e 70 29 3a 0d |Applicat|ion.p):.|
|00002b00| a5 09 54 68 65 20 66 69 | 72 73 74 20 63 61 6c 6c |..The fi|rst call|
|00002b10| 20 74 6f 20 54 72 61 63 | 6b 4f 6e 63 65 20 73 68 | to Trac|kOnce sh|
|00002b20| 6f 75 6c 64 20 72 65 61 | 64 3a 0d 09 09 20 20 20 |ould rea|d:... |
|00002b30| 20 54 72 61 63 6b 4f 6e | 63 65 28 74 72 61 63 6b | TrackOn|ce(track|
|00002b40| 50 72 65 73 73 2c 20 46 | 41 4c 53 45 29 3b 0d a5 |Press, F|ALSE);..|
|00002b50| 09 54 68 65 20 61 73 73 | 69 67 6e 6d 65 6e 74 20 |.The ass|ignment |
|00002b60| 6f 66 20 64 69 64 4d 6f | 76 65 20 73 68 6f 75 6c |of didMo|ve shoul|
|00002b70| 64 20 72 65 61 64 3a 0d | 09 20 20 20 20 64 69 64 |d read:.|. did|
|00002b80| 4d 6f 76 65 20 3a 3d 20 | 6d 6f 76 65 64 4f 6e 63 |Move := |movedOnc|
|00002b90| 65 20 26 20 28 4e 4f 54 | 20 45 71 75 61 6c 56 50 |e & (NOT| EqualVP|
|00002ba0| 74 28 70 72 65 76 69 6f | 75 73 50 6f 69 6e 74 2c |t(previo|usPoint,|
|00002bb0| 20 74 68 65 4d 6f 75 73 | 65 29 29 2e 0d a5 09 54 | theMous|e))....T|
|00002bc0| 68 65 20 6c 61 73 74 20 | 63 61 6c 6c 20 74 6f 20 |he last |call to |
|00002bd0| 54 72 61 63 6b 4f 6e 63 | 65 20 73 68 6f 75 6c 64 |TrackOnc|e should|
|00002be0| 20 72 65 61 64 3a 0d 09 | 09 20 20 20 20 54 72 61 | read:..|. Tra|
|00002bf0| 63 6b 4f 6e 63 65 28 74 | 72 61 63 6b 52 65 6c 65 |ckOnce(t|rackRele|
|00002c00| 61 73 65 2c 20 64 69 64 | 4d 6f 76 65 29 3b 0d 09 |ase, did|Move);..|
|00002c10| 4f 6e 63 65 20 74 68 6f | 73 65 20 63 68 61 6e 67 |Once tho|se chang|
|00002c20| 65 73 20 68 61 76 65 20 | 62 65 65 6e 20 61 70 70 |es have |been app|
|00002c30| 6c 69 65 64 2c 20 74 68 | 65 20 70 61 72 74 73 20 |lied, th|e parts |
|00002c40| 6f 66 20 4d 61 63 41 70 | 70 20 74 68 61 74 20 61 |of MacAp|p that a|
|00002c50| 73 73 75 6d 65 20 6d 6f | 75 73 65 44 69 64 4d 6f |ssume mo|useDidMo|
|00002c60| 76 65 20 3d 20 54 52 55 | 45 20 77 68 65 6e 20 61 |ve = TRU|E when a|
|00002c70| 54 72 61 63 6b 50 68 61 | 73 65 20 3d 20 54 72 61 |TrackPha|se = Tra|
|00002c80| 63 6b 50 72 65 73 73 20 | 6e 65 65 64 20 74 6f 20 |ckPress |need to |
|00002c90| 62 65 20 75 70 64 61 74 | 65 64 2e 20 20 49 6e 20 |be updat|ed. In |
|00002ca0| 74 68 65 20 6d 65 74 68 | 6f 64 73 20 54 43 65 6c |the meth|ods TCel|
|00002cb0| 6c 53 65 6c 65 63 74 43 | 6f 6d 6d 61 6e 64 2e 54 |lSelectC|ommand.T|
|00002cc0| 72 61 63 6b 4d 6f 75 73 | 65 20 61 6e 64 20 54 52 |rackMous|e and TR|
|00002cd0| 43 53 65 6c 65 63 74 43 | 6f 6d 6d 61 6e 64 2e 54 |CSelectC|ommand.T|
|00002ce0| 72 61 63 6b 4d 6f 75 73 | 65 20 28 66 69 6c 65 20 |rackMous|e (file |
|00002cf0| 55 47 72 69 64 56 69 65 | 77 2e 69 6e 63 31 2e 70 |UGridVie|w.inc1.p|
|00002d00| 29 2c 20 72 65 70 6c 61 | 63 65 3a 0d 20 20 20 20 |), repla|ce:. |
|00002d10| 20 20 20 20 20 20 20 20 | 20 20 49 46 20 6d 6f 75 | | IF mou|
|00002d20| 73 65 44 69 64 4d 6f 76 | 65 20 54 48 45 4e 0d 09 |seDidMov|e THEN..|
|00002d30| 57 69 74 68 3a 0d 20 20 | 20 20 20 20 20 20 20 20 |With:. | |
|00002d40| 20 20 20 20 49 46 20 6d | 6f 75 73 65 44 69 64 4d | IF m|ouseDidM|
|00002d50| 6f 76 65 20 7c 20 28 61 | 54 72 61 63 6b 50 68 61 |ove | (a|TrackPha|
|00002d60| 73 65 20 3d 20 54 72 61 | 63 6b 50 72 65 73 73 29 |se = Tra|ckPress)|
|00002d70| 20 54 48 45 4e 0d 09 59 | 6f 75 20 73 68 6f 75 6c | THEN..Y|ou shoul|
|00002d80| 64 20 61 6c 73 6f 20 6d | 61 6b 65 20 73 69 6d 69 |d also m|ake simi|
|00002d90| 6c 61 72 20 63 68 61 6e | 67 65 73 20 74 6f 20 79 |lar chan|ges to y|
|00002da0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e d5 |our appl|ication.|
|00002db0| 73 20 73 6f 75 72 63 65 | 2c 20 69 66 20 61 70 70 |s source|, if app|
|00002dc0| 6c 69 63 61 62 6c 65 2e | 20 46 6f 72 20 69 6e 73 |licable.| For ins|
|00002dd0| 74 61 6e 63 65 2c 20 69 | 6e 20 55 43 61 6c 63 2e |tance, i|n UCalc.|
|00002de0| 69 6e 63 31 2e 70 2c 20 | 54 43 6f 6c 75 6d 6e 53 |inc1.p, |TColumnS|
|00002df0| 65 6c 65 63 74 6f 72 2e | 54 72 61 63 6b 4d 6f 75 |elector.|TrackMou|
|00002e00| 73 65 20 61 6e 64 20 54 | 52 6f 77 53 65 6c 65 63 |se and T|RowSelec|
|00002e10| 74 6f 72 2e 54 72 61 63 | 6b 4d 6f 75 73 65 20 6e |tor.Trac|kMouse n|
|00002e20| 65 65 64 20 74 6f 20 63 | 68 65 63 6b 20 66 6f 72 |eed to c|heck for|
|00002e30| 20 61 54 72 61 63 6b 50 | 68 61 73 65 20 3d 20 54 | aTrackP|hase = T|
|00002e40| 72 61 63 6b 50 72 65 73 | 73 2e 0d 34 2e 09 57 69 |rackPres|s..4..Wi|
|00002e50| 74 68 20 74 68 65 73 65 | 20 63 68 61 6e 67 65 73 |th these| changes|
|00002e60| 2c 20 69 74 20 69 73 20 | 70 6f 73 73 69 62 6c 65 |, it is |possible|
|00002e70| 20 74 6f 20 65 78 70 65 | 72 69 65 6e 63 65 20 73 | to expe|rience s|
|00002e80| 6f 6d 65 20 66 65 65 64 | 62 61 63 6b 20 70 72 6f |ome feed|back pro|
|00002e90| 62 6c 65 6d 73 2e 20 20 | 46 6f 72 20 65 78 61 6d |blems. |For exam|
|00002ea0| 70 6c 65 2c 20 77 68 65 | 6e 20 72 65 73 69 7a 69 |ple, whe|n resizi|
|00002eb0| 6e 67 20 74 68 65 20 63 | 6f 6c 75 6d 6e 20 77 69 |ng the c|olumn wi|
|00002ec0| 64 74 68 73 20 69 6e 20 | 61 20 73 70 72 65 61 64 |dths in |a spread|
|00002ed0| 73 68 65 65 74 2c 20 43 | 61 6c 63 20 64 72 61 77 |sheet, C|alc draw|
|00002ee0| 73 20 74 68 65 20 69 6e | 69 74 69 61 6c 20 76 65 |s the in|itial ve|
|00002ef0| 72 74 69 63 61 6c 20 6c | 69 6e 65 2c 20 77 61 69 |rtical l|ine, wai|
|00002f00| 74 73 20 75 6e 74 69 6c | 20 74 68 65 20 6d 6f 75 |ts until| the mou|
|00002f10| 73 65 20 6d 6f 76 65 64 | 20 6f 75 74 73 69 64 65 |se moved| outside|
|00002f20| 20 74 68 65 20 68 79 73 | 74 65 72 65 73 69 73 20 | the hys|teresis |
|00002f30| 72 61 6e 67 65 2c 20 61 | 6e 64 20 74 68 65 6e 2c |range, a|nd then,|
|00002f40| 20 62 65 66 6f 72 65 20 | 64 72 61 77 69 6e 67 20 | before |drawing |
|00002f50| 74 68 65 20 76 65 72 74 | 69 63 61 6c 20 6c 69 6e |the vert|ical lin|
|00002f60| 65 20 69 6e 20 69 74 73 | 20 6e 65 77 20 6c 6f 63 |e in its| new loc|
|00002f70| 61 74 69 6f 6e 2c 20 65 | 72 61 73 65 73 20 74 68 |ation, e|rases th|
|00002f80| 65 20 6f 6c 64 20 76 65 | 72 74 69 63 61 6c 20 6c |e old ve|rtical l|
|00002f90| 69 6e 65 20 69 6e 20 74 | 68 65 20 77 72 6f 6e 67 |ine in t|he wrong|
|00002fa0| 20 70 6c 61 63 65 2e 20 | 20 54 68 69 73 20 6c 65 | place. | This le|
|00002fb0| 61 76 65 73 20 74 77 6f | 20 76 65 72 74 69 63 61 |aves two| vertica|
|00002fc0| 6c 20 6c 69 6e 65 73 20 | 6f 6e 20 74 68 65 20 73 |l lines |on the s|
|00002fd0| 63 72 65 65 6e 20 61 73 | 20 67 61 72 62 61 67 65 |creen as| garbage|
|00002fe0| 2e 0d 46 69 78 3a 09 49 | 6e 20 55 4d 61 63 41 70 |..Fix:.I|n UMacAp|
|00002ff0| 70 2e 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 70 |p.TAppli|cation.p|
|00003000| 2c 20 72 65 70 6c 61 63 | 65 20 74 68 65 20 66 6f |, replac|e the fo|
|00003010| 75 72 74 68 20 6f 63 63 | 75 72 72 65 6e 63 65 20 |urth occ|urrence |
|00003020| 6f 66 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |of:. | |
|00003030| 20 20 70 72 65 76 69 6f | 75 73 50 6f 69 6e 74 20 | previo|usPoint |
|00003040| 3a 3d 20 74 68 65 4d 6f | 75 73 65 3b 0d 09 57 69 |:= theMo|use;..Wi|
|00003050| 74 68 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |th:. | |
|00003060| 20 20 49 46 20 64 69 64 | 4d 6f 76 65 20 54 48 45 | IF did|Move THE|
|00003070| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N. | |
|00003080| 20 20 20 20 70 72 65 76 | 69 6f 75 73 50 6f 69 6e | prev|iousPoin|
|00003090| 74 20 3a 3d 20 74 68 65 | 4d 6f 75 73 65 3b 0d 35 |t := the|Mouse;.5|
|000030a0| 2e 09 54 68 65 20 73 6f | 6c 75 74 69 6f 6e 20 74 |..The so|lution t|
|000030b0| 68 61 74 20 70 72 65 76 | 69 6f 75 73 6c 79 20 6f |hat prev|iously o|
|000030c0| 63 63 75 70 69 65 64 20 | 74 68 69 73 20 73 70 6f |ccupied |this spo|
|000030d0| 74 20 63 61 75 73 65 64 | 20 6d 6f 72 65 20 70 72 |t caused| more pr|
|000030e0| 6f 62 6c 65 6d 73 20 74 | 68 61 74 20 69 74 20 66 |oblems t|hat it f|
|000030f0| 69 78 65 64 2e 20 20 57 | 65 20 72 65 6d 6f 76 65 |ixed. W|e remove|
|00003100| 64 20 69 74 20 75 6e 74 | 69 6c 20 77 65 20 63 61 |d it unt|il we ca|
|00003110| 6e 20 67 65 74 20 6f 75 | 72 20 61 63 74 20 74 6f |n get ou|r act to|
|00003120| 67 65 74 68 65 72 2e 0d | 54 43 6f 6d 6d 61 6e 64 |gether..|TCommand|
|00003130| 20 28 69 6e 63 6c 75 64 | 69 6e 67 20 73 75 62 63 | (includ|ing subc|
|00003140| 6c 61 73 73 65 73 29 0d | 31 2e 09 46 69 78 65 64 |lasses).|1..Fixed|
|00003150| 20 69 6e 20 4d 61 63 41 | 70 70 20 32 2e 30 2e 31 | in MacA|pp 2.0.1|
|00003160| 2e 0d 32 2e 09 49 66 20 | 61 20 66 61 69 6c 75 72 |..2..If |a failur|
|00003170| 65 20 6f 63 63 75 72 73 | 20 69 6e 20 54 44 6f 63 |e occurs| in TDoc|
|00003180| 75 6d 65 6e 74 2e 52 65 | 76 65 72 74 2c 20 54 52 |ument.Re|vert, TR|
|00003190| 65 76 65 72 74 44 6f 63 | 43 6f 6d 6d 61 6e 64 2e |evertDoc|Command.|
|000031a0| 44 6f 49 74 20 74 72 69 | 65 73 20 74 6f 20 73 68 |DoIt tri|es to sh|
|000031b0| 6f 77 20 74 68 65 20 72 | 65 76 65 72 74 65 64 20 |ow the r|everted |
|000031c0| 64 6f 63 75 6d 65 6e 74 | 2e 20 20 54 68 69 73 20 |document|. This |
|000031d0| 69 73 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 74 |is the c|orrect t|
|000031e0| 68 69 6e 67 20 74 6f 20 | 64 6f 20 69 66 20 74 68 |hing to |do if th|
|000031f0| 65 20 75 73 65 72 20 63 | 61 6e 63 65 6c 65 64 20 |e user c|anceled |
|00003200| 6f 75 74 20 6f 66 20 74 | 68 65 20 72 65 76 65 72 |out of t|he rever|
|00003210| 74 20 69 66 20 61 20 73 | 69 6c 65 6e 74 20 66 61 |t if a s|ilent fa|
|00003220| 69 6c 75 72 65 20 69 73 | 20 73 69 67 6e 61 6c 65 |ilure is| signale|
|00003230| 64 20 28 74 68 69 73 20 | 63 6f 75 6c 64 20 68 61 |d (this |could ha|
|00003240| 70 70 65 6e 20 69 6e 20 | 44 69 73 6b 46 69 6c 65 |ppen in |DiskFile|
|00003250| 43 68 61 6e 67 65 64 29 | 2e 20 20 48 6f 77 65 76 |Changed)|. Howev|
|00003260| 65 72 20 69 66 20 61 20 | 72 65 61 6c 20 65 72 72 |er if a |real err|
|00003270| 6f 72 20 6f 63 63 75 72 | 72 65 64 2c 20 79 6f 75 |or occur|red, you|
|00003280| 20 63 61 6e 6e 6f 74 20 | 6c 65 61 76 65 20 74 68 | cannot |leave th|
|00003290| 65 20 64 6f 63 75 6d 65 | 6e 74 20 6f 70 65 6e 3b |e docume|nt open;|
|000032a0| 20 79 6f 75 20 64 65 66 | 69 6e 69 74 65 6c 79 20 | you def|initely |
|000032b0| 6d 75 73 74 20 63 6c 6f | 73 65 20 69 74 2e 20 4f |must clo|se it. O|
|000032c0| 74 68 65 72 77 69 73 65 | 20 74 68 65 20 61 70 70 |therwise| the app|
|000032d0| 6c 69 63 61 74 69 6f 6e | 20 6d 61 79 20 62 6f 6d |lication| may bom|
|000032e0| 62 20 69 6e 20 74 68 65 | 20 6e 65 78 74 20 6f 70 |b in the| next op|
|000032f0| 65 72 61 74 69 6f 6e 20 | 69 6e 76 6f 6c 76 69 6e |eration |involvin|
|00003300| 67 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 28 |g the do|cument (|
|00003310| 65 2e 67 2e 2c 20 74 68 | 65 20 6e 65 78 74 20 73 |e.g., th|e next s|
|00003320| 63 72 65 65 6e 20 72 65 | 66 72 65 73 68 29 2e 0d |creen re|fresh)..|
|00003330| 09 57 65 20 68 61 76 65 | 20 74 6f 20 64 69 73 74 |.We have| to dist|
|00003340| 69 6e 67 75 69 73 68 20 | 74 68 72 65 65 20 63 6c |inguish |three cl|
|00003350| 61 73 73 65 73 20 6f 66 | 20 65 72 72 6f 72 73 3a |asses of| errors:|
|00003360| 0d 31 29 09 74 68 65 20 | 75 73 65 72 20 63 61 6e |.1).the |user can|
|00003370| 63 65 6c 65 64 20 6f 75 | 74 20 6f 66 20 74 68 65 |celed ou|t of the|
|00003380| 20 6f 70 65 72 61 74 69 | 6f 6e 20 69 6e 20 43 68 | operati|on in Ch|
|00003390| 65 63 6b 44 69 73 6b 46 | 69 6c 65 2c 0d 32 29 09 |eckDiskF|ile,.2).|
|000033a0| 61 20 72 65 61 6c 20 65 | 72 72 6f 72 20 77 61 73 |a real e|rror was|
|000033b0| 20 64 69 73 63 6f 76 65 | 72 65 64 20 69 6e 20 43 | discove|red in C|
|000033c0| 68 65 63 6b 44 69 73 6b | 46 69 6c 65 2c 0d 33 29 |heckDisk|File,.3)|
|000033d0| 09 61 20 72 65 61 6c 20 | 65 72 72 6f 72 20 6f 63 |.a real |error oc|
|000033e0| 63 75 72 72 65 64 20 64 | 75 72 69 6e 67 20 72 65 |curred d|uring re|
|000033f0| 62 75 69 6c 64 69 6e 67 | 20 74 68 65 20 64 6f 63 |building| the doc|
|00003400| 75 6d 65 6e 74 20 69 6e | 20 44 6f 49 6e 69 74 69 |ument in| DoIniti|
|00003410| 61 6c 53 74 61 74 65 20 | 6f 72 20 52 65 61 64 46 |alState |or ReadF|
|00003420| 72 6f 6d 46 69 6c 65 2e | 0d 09 49 6e 20 74 68 65 |romFile.|..In the|
|00003430| 20 66 69 72 73 74 20 61 | 6e 64 20 73 65 63 6f 6e | first a|nd secon|
|00003440| 64 20 63 61 73 65 73 2c | 20 74 68 65 20 6d 65 6d |d cases,| the mem|
|00003450| 6f 72 79 2d 72 65 73 69 | 64 65 6e 74 20 76 65 72 |ory-resi|dent ver|
|00003460| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 64 6f 63 75 |sion of |the docu|
|00003470| 6d 65 6e 74 20 68 61 73 | 20 6e 6f 74 20 62 65 65 |ment has| not bee|
|00003480| 6e 20 63 68 61 6e 67 65 | 64 20 77 68 65 6e 20 79 |n change|d when y|
|00003490| 6f 75 20 72 65 61 63 68 | 20 48 64 6c 52 65 76 65 |ou reach| HdlReve|
|000034a0| 72 74 43 6d 64 2e 20 20 | 49 6e 20 74 68 65 20 74 |rtCmd. |In the t|
|000034b0| 68 69 72 64 20 63 61 73 | 65 2c 20 74 68 65 20 64 |hird cas|e, the d|
|000034c0| 6f 63 75 6d 65 6e 74 20 | 6d 61 79 20 62 65 20 73 |ocument |may be s|
|000034d0| 65 76 65 72 65 6c 79 20 | 64 61 6d 61 67 65 64 2e |everely |damaged.|
|000034e0| 20 20 54 68 65 72 65 66 | 6f 72 65 2c 20 69 6e 20 | Theref|ore, in |
|000034f0| 74 68 65 20 66 69 72 73 | 74 20 74 77 6f 20 63 61 |the firs|t two ca|
|00003500| 73 65 73 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |ses ther|e is no |
|00003510| 6e 65 65 64 20 74 6f 20 | 63 61 6c 6c 20 53 68 6f |need to |call Sho|
|00003520| 77 52 65 76 65 72 74 65 | 64 20 28 69 74 20 64 6f |wReverte|d (it do|
|00003530| 65 73 6e d5 74 20 68 75 | 72 74 20 65 69 74 68 65 |esn.t hu|rt eithe|
|00003540| 72 29 2c 20 77 68 69 6c | 65 20 69 6e 20 74 68 65 |r), whil|e in the|
|00003550| 20 74 68 69 72 64 20 63 | 61 73 65 20 79 6f 75 20 | third c|ase you |
|00003560| 6d 75 73 74 20 63 6c 6f | 73 65 20 74 68 65 20 64 |must clo|se the d|
|00003570| 6f 63 75 6d 65 6e 74 2e | 0d 09 43 61 73 65 20 6f |ocument.|..Case o|
|00003580| 6e 65 20 69 73 20 65 61 | 73 79 20 74 6f 20 72 65 |ne is ea|sy to re|
|00003590| 63 6f 67 6e 69 7a 65 20 | 28 65 72 72 6f 72 20 3d |cognize |(error =|
|000035a0| 20 30 29 2c 20 62 75 74 | 20 66 6f 72 20 74 68 65 | 0), but| for the|
|000035b0| 20 73 65 63 6f 6e 64 20 | 61 6e 64 20 74 68 69 72 | second |and thir|
|000035c0| 64 20 63 61 73 65 73 2c | 20 65 72 72 6f 72 20 3c |d cases,| error <|
|000035d0| 3e 20 30 2e 20 20 54 6f | 20 64 69 73 74 69 6e 67 |> 0. To| disting|
|000035e0| 75 69 73 68 20 62 65 74 | 77 65 65 6e 20 74 68 65 |uish bet|ween the|
|000035f0| 6d 2c 20 79 6f 75 20 63 | 61 6e 20 70 75 6c 6c 20 |m, you c|an pull |
|00003600| 61 20 74 72 69 63 6b 3a | 20 20 79 6f 75 20 6b 6e |a trick:| you kn|
|00003610| 6f 77 20 74 68 61 74 20 | 74 68 65 20 52 65 76 65 |ow that |the Reve|
|00003620| 72 74 20 6d 65 6e 75 20 | 69 74 65 6d 20 69 73 20 |rt menu |item is |
|00003630| 6f 6e 6c 79 20 65 6e 61 | 62 6c 65 64 20 69 66 20 |only ena|bled if |
|00003640| 66 44 6f 63 75 6d 65 6e | 74 2e 66 43 68 61 6e 67 |fDocumen|t.fChang|
|00003650| 65 43 6f 75 6e 74 20 69 | 73 20 67 72 65 61 74 65 |eCount i|s greate|
|00003660| 72 20 74 68 61 6e 20 7a | 65 72 6f 2e 20 20 54 68 |r than z|ero. Th|
|00003670| 65 72 65 66 6f 72 65 2c | 20 79 6f 75 20 6d 6f 76 |erefore,| you mov|
|00003680| 65 20 53 65 74 43 68 61 | 6e 67 65 43 6f 75 6e 74 |e SetCha|ngeCount|
|00003690| 28 30 29 20 69 6e 20 54 | 44 6f 63 75 6d 65 6e 74 |(0) in T|Document|
|000036a0| 2e 52 65 76 65 72 74 20 | 62 65 66 6f 72 65 20 61 |.Revert |before a|
|000036b0| 6e 79 20 6f 70 65 72 61 | 74 69 6f 6e 20 74 68 61 |ny opera|tion tha|
|000036c0| 74 20 63 61 6e 20 63 6c | 6f 62 62 65 72 20 74 68 |t can cl|obber th|
|000036d0| 65 20 64 6f 63 75 6d 65 | 6e 74 20 28 69 2e 65 2e |e docume|nt (i.e.|
|000036e0| 2c 20 62 65 66 6f 72 65 | 20 74 68 65 20 63 61 6c |, before| the cal|
|000036f0| 6c 20 74 6f 20 46 72 65 | 65 44 61 74 61 29 2e 20 |l to Fre|eData). |
|00003700| 20 54 68 69 73 20 77 61 | 79 2c 20 79 6f 75 20 63 | This wa|y, you c|
|00003710| 61 6e 20 64 69 73 74 69 | 6e 67 75 69 73 68 20 62 |an disti|nguish b|
|00003720| 65 74 77 65 65 6e 20 74 | 68 65 20 73 65 63 6f 6e |etween t|he secon|
|00003730| 64 20 61 6e 64 20 74 68 | 69 72 64 20 63 61 73 65 |d and th|ird case|
|00003740| 73 20 69 6e 20 48 64 6c | 52 65 76 65 72 74 43 6d |s in Hdl|RevertCm|
|00003750| 64 20 62 79 20 63 68 65 | 63 6b 69 6e 67 20 66 43 |d by che|cking fC|
|00003760| 68 61 6e 67 65 43 6f 75 | 6e 74 2e 0d 46 69 78 3a |hangeCou|nt..Fix:|
|00003770| 09 43 68 61 6e 67 65 20 | 74 68 65 20 66 61 69 6c |.Change |the fail|
|00003780| 75 72 65 20 68 61 6e 64 | 6c 69 6e 67 20 70 72 6f |ure hand|ling pro|
|00003790| 63 65 64 75 72 65 20 69 | 6e 20 54 52 65 76 65 72 |cedure i|n TRever|
|000037a0| 74 44 6f 63 43 6f 6d 6d | 61 6e 64 2e 44 6f 49 74 |tDocComm|and.DoIt|
|000037b0| 20 28 66 69 6c 65 20 55 | 4d 61 63 41 70 70 2e 54 | (file U|MacApp.T|
|000037c0| 44 6f 63 75 6d 65 6e 74 | 2e 70 29 20 74 6f 3a 0d |Document|.p) to:.|
|000037d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 52 | | PR|
|000037e0| 4f 43 45 44 55 52 45 20 | 48 64 6c 52 65 76 65 72 |OCEDURE |HdlRever|
|000037f0| 74 43 6d 64 28 65 72 72 | 6f 72 3a 20 4f 53 45 72 |tCmd(err|or: OSEr|
|00003800| 72 3b 20 6d 65 73 73 61 | 67 65 3a 20 4c 4f 4e 47 |r; messa|ge: LONG|
|00003810| 49 4e 54 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |INT);. | |
|00003820| 20 20 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 | |BEGIN. |
|00003830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003840| 7b 43 68 65 63 6b 20 77 | 68 65 74 68 65 72 20 74 |{Check w|hether t|
|00003850| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 68 61 73 20 |he docum|ent has |
|00003860| 61 6c 72 65 61 64 79 20 | 62 65 65 6e 20 63 6c 6f |already |been clo|
|00003870| 62 62 65 72 65 64 20 7d | 0d 20 20 20 20 20 20 20 |bbered }|. |
|00003880| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 66 43 | | IF fC|
|00003890| 68 61 6e 67 65 64 44 6f | 63 75 6d 65 6e 74 2e 47 |hangedDo|cument.G|
|000038a0| 65 74 43 68 61 6e 67 65 | 43 6f 75 6e 74 20 3d 20 |etChange|Count = |
|000038b0| 30 20 54 48 45 4e 0d 20 | 20 20 20 20 20 20 20 20 |0 THEN. | |
|000038c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 66 43 68 | | fCh|
|000038d0| 61 6e 67 65 64 44 6f 63 | 75 6d 65 6e 74 2e 43 6c |angedDoc|ument.Cl|
|000038e0| 6f 73 65 20 20 7b 72 65 | 6d 6f 76 65 20 74 68 65 |ose {re|move the|
|000038f0| 20 64 65 62 72 69 73 20 | 6c 65 66 74 20 62 79 20 | debris |left by |
|00003900| 66 43 68 61 6e 67 65 64 | 44 6f 63 75 6d 65 6e 74 |fChanged|Document|
|00003910| 7d 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00003920| 20 20 20 20 45 4e 44 3b | 0d 09 49 6e 20 54 44 6f | END;|..In TDo|
|00003930| 63 75 6d 65 6e 74 2e 52 | 65 76 65 72 74 2c 20 6d |cument.R|evert, m|
|00003940| 6f 76 65 20 74 68 65 20 | 6c 69 6e 65 0d 20 20 20 |ove the |line. |
|00003950| 20 20 20 20 20 20 20 20 | 20 20 20 20 53 65 74 43 | | SetC|
|00003960| 68 61 6e 67 65 43 6f 75 | 6e 74 28 30 29 3b 0d 09 |hangeCou|nt(0);..|
|00003970| 62 65 66 6f 72 65 20 74 | 68 65 20 6c 69 6e 65 0d |before t|he line.|
|00003980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 46 | | F|
|00003990| 72 65 65 44 61 74 61 3b | 0d 33 2e 09 49 74 20 69 |reeData;|.3..It i|
|000039a0| 73 20 70 6f 74 65 6e 74 | 69 61 6c 6c 79 20 70 72 |s potent|ially pr|
|000039b0| 6f 62 6c 65 6d 61 74 69 | 63 20 68 61 76 69 6e 67 |oblemati|c having|
|000039c0| 20 50 61 67 65 20 53 65 | 74 75 70 20 61 73 20 61 | Page Se|tup as a|
|000039d0| 6e 20 75 6e 64 6f 61 62 | 6c 65 20 63 6f 6d 6d 61 |n undoab|le comma|
|000039e0| 6e 64 2c 20 73 69 6e 63 | 65 20 74 68 65 20 76 69 |nd, sinc|e the vi|
|000039f0| 65 77 20 61 6e 64 20 70 | 72 69 6e 74 65 72 20 64 |ew and p|rinter d|
|00003a00| 72 69 76 65 72 20 63 6f | 6e 74 65 78 74 20 63 61 |river co|ntext ca|
|00003a10| 6e 20 63 68 61 6e 67 65 | 2e 20 20 41 6e 20 65 78 |n change|. An ex|
|00003a20| 61 6d 70 6c 65 20 6f 66 | 20 74 68 69 73 20 69 73 |ample of| this is|
|00003a30| 20 73 68 6f 77 6e 20 77 | 69 74 68 20 74 68 65 20 | shown w|ith the |
|00003a40| 66 6f 6c 6c 6f 77 69 6e | 67 20 73 74 65 70 73 3a |followin|g steps:|
|00003a50| 0d 31 29 09 4c 61 75 6e | 63 68 20 61 6e 79 20 4d |.1).Laun|ch any M|
|00003a60| 61 63 41 70 70 20 61 70 | 70 6c 69 63 61 74 69 6f |acApp ap|plicatio|
|00003a70| 6e 2e 0d 32 29 09 41 63 | 63 65 73 73 20 74 68 65 |n..2).Ac|cess the|
|00003a80| 20 50 61 67 65 20 53 65 | 74 75 70 20 64 69 61 6c | Page Se|tup dial|
|00003a90| 6f 67 20 62 6f 78 20 66 | 72 6f 6d 20 74 68 65 20 |og box f|rom the |
|00003aa0| 46 69 6c 65 20 6d 65 6e | 75 2e 0d 33 29 09 54 61 |File men|u..3).Ta|
|00003ab0| 6b 65 20 6e 6f 74 69 63 | 65 20 6f 66 20 77 68 69 |ke notic|e of whi|
|00003ac0| 63 68 20 70 72 69 6e 74 | 65 72 20 64 72 69 76 65 |ch print|er drive|
|00003ad0| 72 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 20 62 |r is cur|rently b|
|00003ae0| 65 69 6e 67 20 75 73 65 | 64 20 61 6e 64 20 6d 61 |eing use|d and ma|
|00003af0| 6b 65 20 61 20 63 68 61 | 6e 67 65 20 74 6f 20 74 |ke a cha|nge to t|
|00003b00| 68 65 20 64 69 61 6c 6f | 67 20 62 6f 78 20 28 69 |he dialo|g box (i|
|00003b10| 2e 65 2e 2c 20 73 77 69 | 74 63 68 20 74 6f 20 d2 |.e., swi|tch to .|
|00003b20| 6c 61 6e 64 73 63 61 70 | 65 d3 20 70 72 69 6e 74 |landscap|e. print|
|00003b30| 69 6e 67 29 2c 20 63 6c | 69 63 6b 20 6f 6e 20 74 |ing), cl|ick on t|
|00003b40| 68 65 20 4f 4b 20 62 75 | 74 74 6f 6e 2e 0d 34 29 |he OK bu|tton..4)|
|00003b50| 09 41 63 63 65 73 73 20 | 74 68 65 20 43 68 6f 6f |.Access |the Choo|
|00003b60| 73 65 72 20 64 65 73 6b | 20 61 63 63 65 73 73 6f |ser desk| accesso|
|00003b70| 72 79 20 61 6e 64 20 63 | 68 61 6e 67 65 20 74 6f |ry and c|hange to|
|00003b80| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 70 72 69 | a diffe|rent pri|
|00003b90| 6e 74 65 72 20 64 72 69 | 76 65 72 2e 0d 35 29 09 |nter dri|ver..5).|
|00003ba0| 4e 6f 77 20 73 65 6c 65 | 63 74 20 52 65 64 6f 20 |Now sele|ct Redo |
|00003bb0| 50 61 67 65 20 53 65 74 | 75 70 20 43 68 61 6e 67 |Page Set|up Chang|
|00003bc0| 65 73 20 66 72 6f 6d 20 | 74 68 65 20 45 64 69 74 |es from |the Edit|
|00003bd0| 20 6d 65 6e 75 2c 20 74 | 68 65 6e 20 73 65 6c 65 | menu, t|hen sele|
|00003be0| 63 74 20 55 6e 64 6f 20 | 50 61 67 65 20 53 65 74 |ct Undo |Page Set|
|00003bf0| 75 70 20 43 68 61 6e 67 | 65 73 2e 0d 36 29 09 4f |up Chang|es..6).O|
|00003c00| 70 65 6e 20 74 68 65 20 | 50 61 67 65 20 53 65 74 |pen the |Page Set|
|00003c10| 75 70 20 64 69 61 6c 6f | 67 20 62 6f 78 20 66 72 |up dialo|g box fr|
|00003c20| 6f 6d 20 74 68 65 20 46 | 69 6c 65 20 6d 65 6e 75 |om the F|ile menu|
|00003c30| 20 61 6e 64 20 6e 6f 74 | 69 63 65 20 74 68 61 74 | and not|ice that|
|00003c40| 20 74 68 65 20 d2 6c 61 | 6e 64 73 63 61 70 65 d3 | the .la|ndscape.|
|00003c50| 20 70 72 69 6e 74 69 6e | 67 20 69 63 6f 6e 20 69 | printin|g icon i|
|00003c60| 73 20 6e 6f 20 6c 6f 6e | 67 65 72 20 68 69 67 68 |s no lon|ger high|
|00003c70| 6c 69 67 68 74 65 64 2e | 0d 37 29 09 41 6c 74 68 |lighted.|.7).Alth|
|00003c80| 6f 75 67 68 20 74 68 65 | 20 50 61 67 65 20 53 65 |ough the| Page Se|
|00003c90| 74 75 70 20 64 69 61 6c | 6f 67 20 62 6f 78 20 69 |tup dial|og box i|
|00003ca0| 73 20 75 6e 61 66 66 65 | 63 74 65 64 20 62 79 20 |s unaffe|cted by |
|00003cb0| 55 6e 64 6f 20 61 6e 64 | 20 52 65 64 6f 2c 20 74 |Undo and| Redo, t|
|00003cc0| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 69 74 73 65 |he docum|ent itse|
|00003cd0| 6c 66 20 69 73 20 61 66 | 66 65 63 74 65 64 2c 20 |lf is af|fected, |
|00003ce0| 61 73 20 69 74 20 70 72 | 69 6e 74 73 20 6f 75 74 |as it pr|ints out|
|00003cf0| 20 69 6e 20 6c 61 6e 64 | 73 63 61 70 65 20 6d 6f | in land|scape mo|
|00003d00| 64 65 2c 20 77 68 69 6c | 65 20 74 68 65 20 50 61 |de, whil|e the Pa|
|00003d10| 67 65 20 53 65 74 75 70 | 20 64 69 61 6c 6f 67 20 |ge Setup| dialog |
|00003d20| 62 6f 78 20 73 68 6f 77 | 73 20 69 74 20 69 73 20 |box show|s it is |
|00003d30| 69 6e 20 6e 6f 6e 2d 6c | 61 6e 64 73 63 61 70 65 |in non-l|andscape|
|00003d40| 20 6d 6f 64 65 2e 0d 53 | 6f 6c 75 74 69 6f 6e 3a | mode..S|olution:|
|00003d50| 09 41 70 70 6c 65 20 64 | 6f 65 73 20 6e 6f 74 20 |.Apple d|oes not |
|00003d60| 79 65 74 20 68 61 76 65 | 20 61 20 63 6f 6d 70 6c |yet have| a compl|
|00003d70| 65 74 65 20 73 6f 6c 75 | 74 69 6f 6e 20 74 6f 20 |ete solu|tion to |
|00003d80| 74 68 69 73 2e 20 20 49 | 66 20 69 74 20 62 6f 74 |this. I|f it bot|
|00003d90| 68 65 72 73 20 79 6f 75 | 2c 20 79 6f 75 20 63 6f |hers you|, you co|
|00003da0| 75 6c 64 20 6d 6f 64 69 | 66 79 20 49 50 72 69 6e |uld modi|fy IPrin|
|00003db0| 74 53 74 79 6c 65 43 68 | 61 6e 67 65 43 6f 6d 6d |tStyleCh|angeComm|
|00003dc0| 61 6e 64 20 74 6f 20 6d | 61 6b 65 20 70 61 67 65 |and to m|ake page|
|00003dd0| 20 73 65 74 75 70 20 6e | 6f 6e 2d 75 6e 64 6f 61 | setup n|on-undoa|
|00003de0| 62 6c 65 2e 0d 54 43 6f | 6e 74 72 6f 6c 0d 31 2e |ble..TCo|ntrol.1.|
|00003df0| 09 4d 61 63 41 70 70 d5 | 73 20 73 75 62 63 6c 61 |.MacApp.|s subcla|
|00003e00| 73 73 65 73 20 6f 66 20 | 54 43 6f 6e 74 72 6f 6c |sses of |TControl|
|00003e10| 20 28 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 | (define|d in the|
|00003e20| 20 66 69 6c 65 20 55 44 | 69 61 6c 6f 67 2e 69 6e | file UD|ialog.in|
|00003e30| 63 31 2e 70 29 20 64 6f | 6e d5 74 20 70 61 73 73 |c1.p) do|n.t pass|
|00003e40| 20 6f 6e 20 74 68 65 69 | 72 20 69 74 73 44 6f 63 | on thei|r itsDoc|
|00003e50| 75 6d 65 6e 74 20 70 61 | 72 61 6d 65 74 65 72 20 |ument pa|rameter |
|00003e60| 74 6f 20 74 68 65 20 49 | 4e 48 45 52 49 54 45 44 |to the I|NHERITED|
|00003e70| 20 49 52 65 73 20 6d 65 | 74 68 6f 64 2e 20 20 54 | IRes me|thod. T|
|00003e80| 68 69 73 20 63 61 75 73 | 65 73 20 74 68 65 20 66 |his caus|es the f|
|00003e90| 44 6f 63 75 6d 65 6e 74 | 20 66 69 65 6c 64 20 74 |Document| field t|
|00003ea0| 6f 20 67 65 74 20 69 6e | 69 74 69 61 6c 69 7a 65 |o get in|itialize|
|00003eb0| 64 20 77 69 74 68 20 4e | 49 4c 20 72 61 74 68 65 |d with N|IL rathe|
|00003ec0| 72 20 74 68 61 6e 20 74 | 68 65 20 54 44 6f 63 75 |r than t|he TDocu|
|00003ed0| 6d 65 6e 74 20 72 65 66 | 65 72 65 6e 63 65 2e 0d |ment ref|erence..|
|00003ee0| 53 6f 6c 75 74 69 6f 6e | 3a 09 59 6f 75 20 63 61 |Solution|:.You ca|
|00003ef0| 6e 20 6f 76 65 72 72 69 | 64 65 20 74 68 65 20 49 |n overri|de the I|
|00003f00| 52 65 73 20 6d 65 74 68 | 6f 64 20 6f 66 20 79 6f |Res meth|od of yo|
|00003f10| 75 72 20 6f 77 6e 20 63 | 6f 6e 74 72 6f 6c 73 20 |ur own c|ontrols |
|00003f20| 74 6f 20 64 6f 20 61 6e | 20 49 4e 48 45 52 49 54 |to do an| INHERIT|
|00003f30| 45 44 20 49 52 65 73 20 | 61 6e 64 20 74 68 65 6e |ED IRes |and then|
|00003f40| 20 73 65 74 20 74 68 65 | 20 66 44 6f 63 75 6d 65 | set the| fDocume|
|00003f50| 6e 74 20 66 69 65 6c 64 | 20 74 6f 20 69 74 73 44 |nt field| to itsD|
|00003f60| 6f 63 75 6d 65 6e 74 3a | 0d 20 20 20 20 20 20 20 |ocument:|. |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 50 | | P|
|00003f80| 52 4f 43 45 44 55 52 45 | 20 54 4d 79 42 75 74 74 |ROCEDURE| TMyButt|
|00003f90| 6f 6e 2e 49 52 65 73 28 | 69 74 73 44 6f 63 75 6d |on.IRes(|itsDocum|
|00003fa0| 65 6e 74 3a 20 54 44 6f | 63 75 6d 65 6e 74 3b 0d |ent: TDo|cument;.|
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00003fe0| 74 73 53 75 70 65 72 56 | 69 65 77 3a 20 54 56 69 |tsSuperV|iew: TVi|
|00003ff0| 65 77 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ew;. | |
|00004000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004020| 20 20 20 56 41 52 20 69 | 74 73 50 61 72 61 6d 73 | VAR i|tsParams|
|00004030| 3a 20 50 74 72 29 3b 20 | 4f 56 45 52 52 49 44 45 |: Ptr); |OVERRIDE|
|00004040| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 42 45 47 49 | | BEGI|
|00004060| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N. | |
|00004070| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 4e 48 45 | | INHE|
|00004080| 52 49 54 45 44 20 49 52 | 65 73 28 69 74 73 44 6f |RITED IR|es(itsDo|
|00004090| 63 75 6d 65 6e 74 2c 20 | 69 74 73 53 75 70 65 72 |cument, |itsSuper|
|000040a0| 56 69 65 77 2c 20 69 74 | 73 50 61 72 61 6d 73 29 |View, it|sParams)|
|000040b0| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 66 44 6f 63 | | fDoc|
|000040d0| 75 6d 65 6e 74 20 3a 3d | 20 69 74 73 44 6f 63 75 |ument :=| itsDocu|
|000040e0| 6d 65 6e 74 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ment;. | |
|000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004100| 45 4e 44 3b 0d 09 54 68 | 65 6e 20 72 65 67 69 73 |END;..Th|en regis|
|00004110| 74 65 72 20 79 6f 75 72 | 20 63 6c 61 73 73 20 69 |ter your| class i|
|00004120| 6e 20 79 6f 75 72 20 49 | 59 6f 75 72 41 70 70 6c |n your I|YourAppl|
|00004130| 69 63 61 74 69 6f 6e 20 | 6d 65 74 68 6f 64 20 73 |ication |method s|
|00004140| 6f 20 74 68 61 74 20 61 | 6c 6c 20 42 75 74 74 6f |o that a|ll Butto|
|00004150| 6e 20 72 65 66 65 72 65 | 6e 63 65 73 20 69 6e 20 |n refere|nces in |
|00004160| 79 6f 75 72 20 27 76 69 | 65 77 27 20 72 65 73 6f |your 'vi|ew' reso|
|00004170| 75 72 63 65 73 20 72 65 | 73 75 6c 74 20 69 6e 20 |urces re|sult in |
|00004180| 54 4d 79 42 75 74 74 6f | 6e 73 20 62 65 69 6e 67 |TMyButto|ns being|
|00004190| 20 63 72 65 61 74 65 64 | 2c 20 72 61 74 68 65 72 | created|, rather|
|000041a0| 20 74 68 61 6e 20 54 42 | 75 74 74 6f 6e 73 3a 0d | than TB|uttons:.|
|000041b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041c0| 20 20 20 20 20 20 52 65 | 67 69 73 74 65 72 53 74 | Re|gisterSt|
|000041d0| 64 54 79 70 65 28 27 54 | 4d 79 42 75 74 74 6f 6e |dType('T|MyButton|
|000041e0| 27 2c 20 6b 53 74 64 42 | 75 74 74 6f 6e 29 3b 0d |', kStdB|utton);.|
|000041f0| 09 48 6f 77 65 76 65 72 | 2c 20 74 68 69 73 20 73 |.However|, this s|
|00004200| 6f 6c 75 74 69 6f 6e 20 | 64 6f 65 73 20 6e 6f 74 |olution |does not|
|00004210| 20 77 6f 72 6b 20 69 66 | 20 79 6f 75 20 64 65 70 | work if| you dep|
|00004220| 65 6e 64 20 6f 6e 20 74 | 68 65 73 65 20 76 69 65 |end on t|hese vie|
|00004230| 77 73 20 61 70 70 65 61 | 72 69 6e 67 20 69 6e 20 |ws appea|ring in |
|00004240| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 d5 73 20 66 |the docu|ment.s f|
|00004250| 56 69 65 77 4c 69 73 74 | 2e 0d 46 69 78 3a 09 52 |ViewList|..Fix:.R|
|00004260| 65 70 6c 61 63 65 20 74 | 68 65 20 63 61 6c 6c 73 |eplace t|he calls|
|00004270| 20 74 6f 20 49 4e 48 45 | 52 49 54 45 44 20 49 52 | to INHE|RITED IR|
|00004280| 65 73 20 69 6e 20 74 68 | 65 20 49 52 65 73 20 6d |es in th|e IRes m|
|00004290| 65 74 68 6f 64 73 20 6f | 66 20 73 75 62 63 6c 61 |ethods o|f subcla|
|000042a0| 73 73 65 73 20 6f 66 20 | 54 43 6f 6e 74 72 6f 6c |sses of |TControl|
|000042b0| 3a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:. | |
|000042c0| 49 4e 48 45 52 49 54 45 | 44 20 49 52 65 73 28 4e |INHERITE|D IRes(N|
|000042d0| 49 4c 2c 20 69 74 73 53 | 75 70 65 72 56 69 65 77 |IL, itsS|uperView|
|000042e0| 2c 20 69 74 73 50 61 72 | 61 6d 73 29 3b 0d 09 57 |, itsPar|ams);..W|
|000042f0| 69 74 68 3a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ith:. | |
|00004300| 20 20 20 49 4e 48 45 52 | 49 54 45 44 20 49 52 65 | INHER|ITED IRe|
|00004310| 73 28 69 74 73 44 6f 63 | 75 6d 65 6e 74 2c 20 69 |s(itsDoc|ument, i|
|00004320| 74 73 53 75 70 65 72 56 | 69 65 77 2c 20 69 74 73 |tsSuperV|iew, its|
|00004330| 50 61 72 61 6d 73 29 3b | 0d 32 2e 09 50 72 69 6e |Params);|.2..Prin|
|00004340| 74 69 6e 67 20 64 69 73 | 61 62 6c 65 64 20 63 6f |ting dis|abled co|
|00004350| 6e 74 72 6f 6c 73 2c 20 | 65 73 70 65 63 69 61 6c |ntrols, |especial|
|00004360| 6c 79 20 62 75 74 74 6f | 6e 73 2c 20 72 65 73 75 |ly butto|ns, resu|
|00004370| 6c 74 73 20 69 6e 20 61 | 20 67 72 61 79 20 70 61 |lts in a| gray pa|
|00004380| 74 74 65 72 6e 20 62 65 | 69 6e 67 20 70 72 69 6e |ttern be|ing prin|
|00004390| 74 65 64 20 6f 76 65 72 | 20 74 68 65 20 63 6f 6e |ted over| the con|
|000043a0| 74 72 6f 6c 2e 20 20 54 | 68 69 73 20 69 73 20 6e |trol. T|his is n|
|000043b0| 6f 74 20 61 20 62 75 67 | 20 69 6e 20 4d 61 63 41 |ot a bug| in MacA|
|000043c0| 70 70 2c 20 62 75 74 20 | 72 61 74 68 65 72 20 61 |pp, but |rather a|
|000043d0| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 20 6f 66 20 74 | limitat|ion of t|
|000043e0| 68 65 20 4c 61 73 65 72 | 57 72 69 74 65 72 2e 20 |he Laser|Writer. |
|000043f0| 20 54 68 65 20 4c 61 73 | 65 72 57 72 69 74 65 72 | The Las|erWriter|
|00004400| 20 64 72 69 76 65 72 20 | 64 6f 65 73 6e d5 74 20 | driver |doesn.t |
|00004410| 72 65 73 70 65 63 74 20 | 61 6c 6c 20 51 75 69 63 |respect |all Quic|
|00004420| 6b 44 72 61 77 20 74 72 | 61 6e 73 66 65 72 20 6d |kDraw tr|ansfer m|
|00004430| 6f 64 65 73 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |odes, in|cluding |
|00004440| 74 68 65 20 6f 6e 65 20 | 75 73 65 64 20 74 6f 20 |the one |used to |
|00004450| 64 72 61 77 20 74 68 65 | 20 67 72 65 79 20 74 65 |draw the| grey te|
|00004460| 78 74 2e 0d 53 6f 6c 75 | 74 69 6f 6e 3a 09 4e 6f |xt..Solu|tion:.No|
|00004470| 74 20 79 65 74 20 64 65 | 74 65 72 6d 69 6e 65 64 |t yet de|termined|
|00004480| 2e 20 20 49 74 20 6d 61 | 79 20 69 6e 76 6f 6c 76 |. It ma|y involv|
|00004490| 65 20 69 6d 61 67 69 6e | 67 20 74 68 65 20 62 75 |e imagin|g the bu|
|000044a0| 74 74 6f 6e 20 69 6e 74 | 6f 20 61 6e 20 6f 66 66 |tton int|o an off|
|000044b0| 2d 73 63 72 65 65 6e 20 | 62 69 74 6d 61 70 2c 20 |-screen |bitmap, |
|000044c0| 61 6e 64 20 74 68 65 6e | 20 63 6f 70 79 69 6e 67 |and then| copying|
|000044d0| 20 69 74 20 74 6f 20 69 | 74 73 20 64 65 73 74 69 | it to i|ts desti|
|000044e0| 6e 61 74 69 6f 6e 2e 0d | 54 43 74 6c 4d 67 72 0d |nation..|TCtlMgr.|
|000044f0| 31 2e 09 46 69 78 65 64 | 20 69 6e 20 4d 61 63 41 |1..Fixed| in MacA|
|00004500| 70 70 20 32 2e 30 2e 31 | 2e 0d 32 2e 09 46 69 78 |pp 2.0.1|..2..Fix|
|00004510| 65 64 20 69 6e 20 4d 61 | 63 41 70 70 20 32 2e 30 |ed in Ma|cApp 2.0|
|00004520| 2e 31 2e 0d 54 44 65 73 | 6b 53 63 72 61 70 56 69 |.1..TDes|kScrapVi|
|00004530| 65 77 0d 31 2e 09 46 69 | 78 65 64 20 69 6e 20 4d |ew.1..Fi|xed in M|
|00004540| 61 63 41 70 70 20 32 2e | 30 2e 31 2e 0d 54 44 69 |acApp 2.|0.1..TDi|
|00004550| 61 6c 6f 67 56 69 65 77 | 0d 31 2e 09 54 44 69 61 |alogView|.1..TDia|
|00004560| 6c 6f 67 56 69 65 77 20 | 63 61 6c 6c 73 20 44 6f |logView |calls Do|
|00004570| 43 68 6f 69 63 65 20 6f | 6e 20 61 20 64 69 73 61 |Choice o|n a disa|
|00004580| 62 6c 65 64 20 62 75 74 | 74 6f 6e 20 61 73 20 74 |bled but|ton as t|
|00004590| 68 65 20 72 65 73 75 6c | 74 20 6f 66 20 61 20 6b |he resul|t of a k|
|000045a0| 65 79 20 70 72 65 73 73 | 2e 20 20 49 66 20 6f 6e |ey press|. If on|
|000045b0| 65 20 64 69 73 61 62 6c | 65 73 20 74 68 65 20 64 |e disabl|es the d|
|000045c0| 65 66 61 75 6c 74 20 62 | 75 74 74 6f 6e 20 61 6e |efault b|utton an|
|000045d0| 64 20 70 72 65 73 73 65 | 73 20 52 65 74 75 72 6e |d presse|s Return|
|000045e0| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |, for ex|ample, t|
|000045f0| 68 65 20 62 75 74 74 6f | 6e d5 73 20 44 6f 43 68 |he butto|n.s DoCh|
|00004600| 6f 69 63 65 20 6d 65 74 | 68 6f 64 20 73 74 69 6c |oice met|hod stil|
|00004610| 6c 20 67 65 74 73 20 63 | 61 6c 6c 65 64 2e 0d 46 |l gets c|alled..F|
|00004620| 69 78 3a 09 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ix:.The |followin|
|00004630| 67 20 6c 69 6e 65 73 20 | 6f 66 20 63 6f 64 65 20 |g lines |of code |
|00004640| 61 70 70 65 61 72 20 69 | 6e 20 54 44 69 61 6c 6f |appear i|n TDialo|
|00004650| 67 56 69 65 77 2e 44 6f | 43 6f 6d 6d 61 6e 64 4b |gView.Do|CommandK|
|00004660| 65 79 20 61 6e 64 20 69 | 6e 20 54 44 69 61 6c 6f |ey and i|n TDialo|
|00004670| 67 56 69 65 77 2e 44 6f | 4b 65 79 43 6f 6d 6d 61 |gView.Do|KeyComma|
|00004680| 6e 64 20 28 66 69 6c 65 | 20 55 44 69 61 6c 6f 67 |nd (file| UDialog|
|00004690| 2e 69 6e 63 31 2e 70 29 | 3a 0d 20 20 20 20 20 20 |.inc1.p)|:. |
|000046a0| 20 20 20 20 20 20 20 20 | 49 46 20 63 61 6e 63 65 | |IF cance|
|000046b0| 6c 56 69 65 77 2e 49 73 | 56 69 65 77 45 6e 61 62 |lView.Is|ViewEnab|
|000046c0| 6c 65 64 20 54 48 45 4e | 0d 20 20 20 20 20 20 20 |led THEN|. |
|000046d0| 20 20 20 20 20 20 20 20 | 20 20 20 54 43 6f 6e 74 | | TCont|
|000046e0| 72 6f 6c 28 63 61 6e 63 | 65 6c 56 69 65 77 29 2e |rol(canc|elView).|
|000046f0| 46 6c 61 73 68 3b 0d 20 | 20 20 20 20 20 20 20 20 |Flash;. | |
|00004700| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 63 61 | TCo|ntrol(ca|
|00004710| 6e 63 65 6c 56 69 65 77 | 29 2e 44 6f 43 68 6f 69 |ncelView|).DoChoi|
|00004720| 63 65 28 63 61 6e 63 65 | 6c 56 69 65 77 2c 54 43 |ce(cance|lView,TC|
|00004730| 6f 6e 74 72 6f 6c 28 63 | 61 6e 63 65 6c 56 69 65 |ontrol(c|ancelVie|
|00004740| 77 29 2e 66 44 65 66 43 | 68 6f 69 63 65 29 3b 0d |w).fDefC|hoice);.|
|00004750| 09 52 65 70 6c 61 63 65 | 20 74 68 65 6d 20 77 69 |.Replace| them wi|
|00004760| 74 68 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |th:. | |
|00004770| 20 20 49 46 20 63 61 6e | 63 65 6c 56 69 65 77 2e | IF can|celView.|
|00004780| 49 73 56 69 65 77 45 6e | 61 62 6c 65 64 20 54 48 |IsViewEn|abled TH|
|00004790| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|000047a0| 20 20 20 20 20 42 45 47 | 49 4e 0d 20 20 20 20 20 | BEG|IN. |
|000047b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 43 6f | | TCo|
|000047c0| 6e 74 72 6f 6c 28 63 61 | 6e 63 65 6c 56 69 65 77 |ntrol(ca|ncelView|
|000047d0| 29 2e 46 6c 61 73 68 3b | 0d 20 20 20 20 20 20 20 |).Flash;|. |
|000047e0| 20 20 20 20 20 20 20 20 | 20 20 20 54 43 6f 6e 74 | | TCont|
|000047f0| 72 6f 6c 28 63 61 6e 63 | 65 6c 56 69 65 77 29 2e |rol(canc|elView).|
|00004800| 44 6f 43 68 6f 69 63 65 | 28 63 61 6e 63 65 6c 56 |DoChoice|(cancelV|
|00004810| 69 65 77 2c 0d 20 20 20 | 20 20 20 20 20 20 20 20 |iew,. | |
|00004820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004840| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 63 61 | TCo|ntrol(ca|
|00004850| 6e 63 65 6c 56 69 65 77 | 29 2e 66 44 65 66 43 68 |ncelView|).fDefCh|
|00004860| 6f 69 63 65 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |oice);. | |
|00004870| 20 20 20 20 20 20 20 20 | 20 45 4e 44 3b 0d 09 41 | | END;..A|
|00004880| 64 64 69 74 69 6f 6e 61 | 6c 6c 79 2c 20 69 6e 20 |dditiona|lly, in |
|00004890| 54 44 69 61 6c 6f 67 56 | 69 65 77 2e 44 6f 4b 65 |TDialogV|iew.DoKe|
|000048a0| 79 43 6f 6d 6d 61 6e 64 | 2c 20 72 65 70 6c 61 63 |yCommand|, replac|
|000048b0| 65 3a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e:. | |
|000048c0| 20 49 46 20 64 65 66 61 | 75 6c 74 56 69 65 77 2e | IF defa|ultView.|
|000048d0| 49 73 56 69 65 77 45 6e | 61 62 6c 65 64 20 54 48 |IsViewEn|abled TH|
|000048e0| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|000048f0| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 64 65 | TCo|ntrol(de|
|00004900| 66 61 75 6c 74 56 69 65 | 77 29 2e 46 6c 61 73 68 |faultVie|w).Flash|
|00004910| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 |;. | T|
|00004920| 43 6f 6e 74 72 6f 6c 28 | 64 65 66 61 75 6c 74 56 |Control(|defaultV|
|00004930| 69 65 77 29 2e 44 6f 43 | 68 6f 69 63 65 28 64 65 |iew).DoC|hoice(de|
|00004940| 66 61 75 6c 74 56 69 65 | 77 2c 54 43 6f 6e 74 72 |faultVie|w,TContr|
|00004950| 6f 6c 28 64 65 66 61 75 | 6c 74 56 69 65 77 29 2e |ol(defau|ltView).|
|00004960| 66 44 65 66 43 68 6f 69 | 63 65 29 3b 0d 09 09 52 |fDefChoi|ce);...R|
|00004970| 65 70 6c 61 63 65 20 74 | 68 65 6d 20 77 69 74 68 |eplace t|hem with|
|00004980| 3a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:. | |
|00004990| 49 46 20 64 65 66 61 75 | 6c 74 56 69 65 77 2e 49 |IF defau|ltView.I|
|000049a0| 73 56 69 65 77 45 6e 61 | 62 6c 65 64 20 54 48 45 |sViewEna|bled THE|
|000049b0| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N. | |
|000049c0| 20 20 20 20 42 45 47 49 | 4e 0d 20 20 20 20 20 20 | BEGI|N. |
|000049d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 43 6f 6e | | TCon|
|000049e0| 74 72 6f 6c 28 64 65 66 | 61 75 6c 74 56 69 65 77 |trol(def|aultView|
|000049f0| 29 2e 46 6c 61 73 68 3b | 0d 20 20 20 20 20 20 20 |).Flash;|. |
|00004a00| 20 20 20 20 20 20 20 20 | 20 20 20 54 43 6f 6e 74 | | TCont|
|00004a10| 72 6f 6c 28 64 65 66 61 | 75 6c 74 56 69 65 77 29 |rol(defa|ultView)|
|00004a20| 2e 44 6f 43 68 6f 69 63 | 65 28 64 65 66 61 75 6c |.DoChoic|e(defaul|
|00004a30| 74 56 69 65 77 2c 0d 20 | 20 20 20 20 20 20 20 20 |tView,. | |
|00004a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a60| 20 20 20 20 20 20 20 20 | 54 43 6f 6e 74 72 6f 6c | |TControl|
|00004a70| 28 64 65 66 61 75 6c 74 | 56 69 65 77 29 2e 66 44 |(default|View).fD|
|00004a80| 65 66 43 68 6f 69 63 65 | 29 3b 0d 20 20 20 20 20 |efChoice|);. |
|00004a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 45 4e 44 | | END|
|00004aa0| 3b 0d 53 6f 6c 75 74 69 | 6f 6e 3a 09 59 6f 75 20 |;.Soluti|on:.You |
|00004ab0| 63 61 6e 20 64 6f 20 74 | 68 69 73 20 61 73 20 61 |can do t|his as a|
|00004ac0| 6e 20 4f 56 45 52 52 49 | 44 45 20 69 66 20 79 6f |n OVERRI|DE if yo|
|00004ad0| 75 20 68 65 73 69 74 61 | 74 65 20 74 6f 20 63 68 |u hesita|te to ch|
|00004ae0| 61 6e 67 65 20 4d 61 63 | 41 70 70 2e 0d 54 44 6f |ange Mac|App..TDo|
|00004af0| 63 75 6d 65 6e 74 0d 31 | 2e 09 54 44 6f 63 75 6d |cument.1|..TDocum|
|00004b00| 65 6e 74 2e 53 61 76 65 | 20 66 61 69 6c 73 20 69 |ent.Save| fails i|
|00004b10| 66 20 79 6f 75 20 6c 6f | 63 6b 20 61 20 66 69 6c |f you lo|ck a fil|
|00004b20| 65 20 61 66 74 65 72 20 | 6f 70 65 6e 69 6e 67 20 |e after |opening |
|00004b30| 69 74 20 77 69 74 68 20 | 72 65 61 64 20 61 6e 64 |it with |read and|
|00004b40| 20 77 72 69 74 65 20 61 | 63 63 65 73 73 20 61 6e | write a|ccess an|
|00004b50| 64 20 74 68 65 6e 20 74 | 72 79 20 74 6f 20 73 61 |d then t|ry to sa|
|00004b60| 76 65 2e 20 20 54 68 65 | 20 66 69 6c 65 20 69 73 |ve. The| file is|
|00004b70| 20 63 6c 6f 73 65 64 20 | 61 6e 64 20 66 44 61 74 | closed |and fDat|
|00004b80| 61 52 65 66 4e 75 6d 20 | 61 6e 64 20 66 52 73 72 |aRefNum |and fRsr|
|00004b90| 63 52 65 66 4e 75 6d 20 | 63 6f 6e 74 61 69 6e 20 |cRefNum |contain |
|00004ba0| 74 68 65 69 72 20 6f 6c | 64 20 28 61 6e 64 20 6e |their ol|d (and n|
|00004bb0| 6f 77 20 69 6e 76 61 6c | 69 64 29 20 76 61 6c 75 |ow inval|id) valu|
|00004bc0| 65 73 2e 0d 53 6f 6c 75 | 74 69 6f 6e 3a 09 4e 6f |es..Solu|tion:.No|
|00004bd0| 74 20 79 65 74 20 64 65 | 74 65 72 6d 69 6e 65 64 |t yet de|termined|
|00004be0| 2e 0d 32 2e 09 49 66 20 | 47 65 74 46 69 6c 65 49 |..2..If |GetFileI|
|00004bf0| 6e 66 6f 20 72 65 74 75 | 72 6e 73 20 61 20 72 65 |nfo retu|rns a re|
|00004c00| 73 75 6c 74 20 6f 74 68 | 65 72 20 74 68 61 6e 20 |sult oth|er than |
|00004c10| 6e 6f 45 72 72 2c 20 54 | 44 6f 63 75 6d 65 6e 74 |noErr, T|Document|
|00004c20| 2e 44 69 73 6b 46 69 6c | 65 43 68 61 6e 67 65 64 |.DiskFil|eChanged|
|00004c30| 20 6d 61 70 73 20 69 74 | 20 74 6f 20 65 72 72 46 | maps it| to errF|
|00004c40| 69 6c 65 43 68 61 6e 67 | 65 64 2c 20 62 65 63 61 |ileChang|ed, beca|
|00004c50| 75 73 65 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |use ther|e is no |
|00004c60| 63 68 65 63 6b 20 66 6f | 72 20 28 65 72 72 20 3d |check fo|r (err =|
|00004c70| 20 6e 6f 45 72 72 29 20 | 69 6e 20 74 68 65 20 45 | noErr) |in the E|
|00004c80| 4c 53 45 20 49 46 20 62 | 72 61 6e 63 68 2e 20 20 |LSE IF b|ranch. |
|00004c90| 54 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 61 6c |The resu|lting al|
|00004ca0| 65 72 74 20 69 73 20 6d | 69 73 6c 65 61 64 69 6e |ert is m|isleadin|
|00004cb0| 67 2c 20 61 73 20 74 68 | 65 20 66 69 6c 65 20 6d |g, as th|e file m|
|00004cc0| 61 79 20 61 6c 73 6f 20 | 68 61 76 65 20 62 65 65 |ay also |have bee|
|00004cd0| 6e 20 72 65 6e 61 6d 65 | 64 2c 20 64 65 6c 65 74 |n rename|d, delet|
|00004ce0| 65 64 2c 20 6f 72 20 74 | 68 65 20 66 69 6c 65 20 |ed, or t|he file |
|00004cf0| 73 65 72 76 65 72 20 6d | 61 79 20 68 61 76 65 20 |server m|ay have |
|00004d00| 67 6f 6e 65 20 6f 66 66 | 6c 69 6e 65 2e 0d 46 69 |gone off|line..Fi|
|00004d10| 78 3a 09 54 68 65 20 65 | 72 72 6f 72 20 63 68 65 |x:.The e|rror che|
|00004d20| 63 6b 69 6e 67 20 63 6f | 64 65 20 69 6e 20 54 44 |cking co|de in TD|
|00004d30| 6f 63 75 6d 65 6e 74 2e | 44 69 73 6b 46 69 6c 65 |ocument.|DiskFile|
|00004d40| 43 68 61 6e 67 65 64 20 | 28 66 69 6c 65 20 55 4d |Changed |(file UM|
|00004d50| 61 63 41 70 70 2e 54 44 | 6f 63 75 6d 65 6e 74 2e |acApp.TD|ocument.|
|00004d60| 70 29 20 73 68 6f 75 6c | 64 20 6c 6f 6f 6b 20 6c |p) shoul|d look l|
|00004d70| 69 6b 65 3a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ike:. | |
|00004d80| 20 20 20 65 72 72 20 3a | 3d 20 47 65 74 46 69 6c | err :|= GetFil|
|00004d90| 65 49 6e 66 6f 28 66 54 | 69 74 6c 65 5e 5e 2c 20 |eInfo(fT|itle^^, |
|00004da0| 66 56 6f 6c 52 65 66 4e | 75 6d 2c 20 70 62 29 3b |fVolRefN|um, pb);|
|00004db0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2e |. | .|
|00004dc0| 2e 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00004dd0| 20 49 46 20 28 65 72 72 | 20 3d 20 6e 6f 45 72 72 | IF (err| = noErr|
|00004de0| 29 20 54 48 45 4e 0d 20 | 20 20 20 20 20 20 20 20 |) THEN. | |
|00004df0| 20 20 20 20 20 20 20 20 | 20 49 46 20 63 68 65 63 | | IF chec|
|00004e00| 6b 54 79 70 65 20 26 20 | 28 70 62 2e 69 6f 46 6c |kType & |(pb.ioFl|
|00004e10| 46 6e 64 72 49 6e 66 6f | 2e 66 64 54 79 70 65 20 |FndrInfo|.fdType |
|00004e20| 3c 3e 20 66 46 69 6c 65 | 54 79 70 65 29 20 54 48 |<> fFile|Type) TH|
|00004e30| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|00004e40| 20 20 20 20 20 20 20 20 | 20 65 72 72 20 3a 3d 20 | | err := |
|00004e50| 65 72 72 46 54 79 70 65 | 43 68 61 6e 67 65 64 0d |errFType|Changed.|
|00004e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004e70| 20 20 45 4c 53 45 20 49 | 46 20 70 62 2e 69 6f 46 | ELSE I|F pb.ioF|
|00004e80| 6c 4d 64 44 61 74 20 3c | 3e 20 66 4d 6f 64 44 61 |lMdDat <|> fModDa|
|00004e90| 74 65 20 54 48 45 4e 0d | 20 20 20 20 20 20 20 20 |te THEN.| |
|00004ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 65 72 | | er|
|00004eb0| 72 20 3a 3d 20 65 72 72 | 46 69 6c 65 43 68 61 6e |r := err|FileChan|
|00004ec0| 67 65 64 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ged;. | |
|00004ed0| 20 20 20 44 69 73 6b 46 | 69 6c 65 43 68 61 6e 67 | DiskF|ileChang|
|00004ee0| 65 64 20 3a 3d 20 65 72 | 72 3b 0d 33 2e 09 49 74 |ed := er|r;.3..It|
|00004ef0| 20 69 73 20 6e 6f 74 20 | 70 6f 73 73 69 62 6c 65 | is not |possible|
|00004f00| 20 74 6f 20 75 73 65 20 | 74 68 65 20 50 61 73 63 | to use |the Pasc|
|00004f10| 61 6c 20 62 75 69 6c 74 | 2d 69 6e 20 66 69 6c 69 |al built|-in fili|
|00004f20| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 20 43 6c 6f 73 |ng funct|ion Clos|
|00004f30| 65 20 66 72 6f 6d 20 77 | 69 74 68 69 6e 20 61 20 |e from w|ithin a |
|00004f40| 54 44 6f 63 75 6d 65 6e | 74 20 6d 65 74 68 6f 64 |TDocumen|t method|
|00004f50| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 4f 62 6a | because| the Obj|
|00004f60| 65 63 74 20 50 61 73 63 | 61 6c 20 73 63 6f 70 69 |ect Pasc|al scopi|
|00004f70| 6e 67 20 72 75 6c 65 73 | 20 61 6c 77 61 79 73 20 |ng rules| always |
|00004f80| 61 73 73 6f 63 69 61 74 | 65 20 74 68 65 20 6e 61 |associat|e the na|
|00004f90| 6d 65 20 43 6c 6f 73 65 | 20 77 69 74 68 20 54 44 |me Close| with TD|
|00004fa0| 6f 63 75 6d 65 6e 74 2e | 43 6c 6f 73 65 2e 0d 53 |ocument.|Close..S|
|00004fb0| 6f 6c 75 74 69 6f 6e 3a | 09 49 74 20 69 73 20 6c |olution:|.It is l|
|00004fc0| 69 6b 65 6c 79 20 74 68 | 61 74 20 41 70 70 6c 65 |ikely th|at Apple|
|00004fd0| 20 77 69 6c 6c 20 63 68 | 61 6e 67 65 20 74 68 65 | will ch|ange the|
|00004fe0| 20 6e 61 6d 65 20 69 6e | 20 74 68 65 20 66 75 74 | name in| the fut|
|00004ff0| 75 72 65 2e 20 20 41 66 | 74 65 72 20 61 6c 6c 2c |ure. Af|ter all,|
|00005000| 20 74 68 65 72 65 20 61 | 72 65 20 74 68 72 65 65 | there a|re three|
|00005010| 20 64 69 73 74 69 6e 63 | 74 20 6f 62 6a 65 63 74 | distinc|t object|
|00005020| 73 20 74 68 61 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |s that i|mplement|
|00005030| 20 61 20 43 6c 6f 73 65 | 20 6d 65 74 68 6f 64 2c | a Close| method,|
|00005040| 20 6e 6f 6e 65 20 6f 66 | 20 77 68 69 63 68 20 68 | none of| which h|
|00005050| 61 76 65 20 61 6e 79 20 | 72 65 6c 61 74 69 6f 6e |ave any |relation|
|00005060| 20 74 6f 20 61 6e 6f 74 | 68 65 72 3b 20 73 6f 6d | to anot|her; som|
|00005070| 65 74 68 69 6e 67 20 6c | 69 6b 65 20 74 68 61 74 |ething l|ike that|
|00005080| 20 6e 65 65 64 73 20 74 | 6f 20 62 65 20 63 6c 65 | needs t|o be cle|
|00005090| 61 6e 65 64 20 75 70 2e | 20 20 49 6e 20 74 68 65 |aned up.| In the|
|000050a0| 20 6d 65 61 6e 74 69 6d | 65 2c 20 79 6f 75 20 63 | meantim|e, you c|
|000050b0| 6f 75 6c 64 20 6d 61 6b | 65 20 61 20 67 6c 6f 62 |ould mak|e a glob|
|000050c0| 61 6c 20 72 6f 75 74 69 | 6e 65 20 4d 79 43 6c 6f |al routi|ne MyClo|
|000050d0| 73 65 20 74 68 61 74 20 | 77 6f 75 6c 64 20 62 65 |se that |would be|
|000050e0| 20 61 20 77 72 61 70 70 | 65 72 20 66 6f 72 20 74 | a wrapp|er for t|
|000050f0| 68 65 20 43 6c 6f 73 65 | 20 72 6f 75 74 69 6e 65 |he Close| routine|
|00005100| 2e 0d 54 45 64 69 74 54 | 65 78 74 0d 31 2e 09 49 |..TEditT|ext.1..I|
|00005110| 66 20 74 68 65 20 66 69 | 72 73 74 20 6f 72 20 6f |f the fi|rst or o|
|00005120| 6e 6c 79 20 54 45 64 69 | 74 54 65 78 74 20 69 6e |nly TEdi|tText in|
|00005130| 20 61 20 64 69 61 6c 6f | 67 20 68 61 73 20 61 75 | a dialo|g has au|
|00005140| 74 6f 2d 77 72 61 70 20 | 74 75 72 6e 65 64 20 6f |to-wrap |turned o|
|00005150| 6e 20 61 6e 64 20 69 73 | 20 6e 6f 74 20 69 6e 69 |n and is| not ini|
|00005160| 74 69 61 6c 6c 79 20 73 | 65 6c 65 63 74 65 64 2c |tially s|elected,|
|00005170| 20 74 61 62 62 69 6e 67 | 20 74 6f 20 69 74 20 61 | tabbing| to it a|
|00005180| 66 74 65 72 20 6f 70 65 | 6e 69 6e 67 20 74 68 65 |fter ope|ning the|
|00005190| 20 77 69 6e 64 6f 77 20 | 73 65 6c 65 63 74 73 20 | window |selects |
|000051a0| 69 74 2c 20 62 75 74 20 | 74 68 65 20 73 65 6c 65 |it, but |the sele|
|000051b0| 63 74 69 6f 6e 20 69 73 | 20 6e 6f 74 20 76 69 73 |ction is| not vis|
|000051c0| 69 62 6c 65 20 75 6e 74 | 69 6c 20 74 68 65 20 77 |ible unt|il the w|
|000051d0| 69 6e 64 6f 77 20 69 73 | 20 72 65 66 72 65 73 68 |indow is| refresh|
|000051e0| 65 64 2e 20 20 54 68 69 | 73 20 64 6f 65 73 20 6e |ed. Thi|s does n|
|000051f0| 6f 74 20 6f 63 63 75 72 | 20 69 66 20 61 75 74 6f |ot occur| if auto|
|00005200| 2d 77 72 61 70 20 69 73 | 20 74 75 72 6e 65 64 20 |-wrap is| turned |
|00005210| 6f 66 66 20 66 6f 72 20 | 74 68 61 74 20 54 45 64 |off for |that TEd|
|00005220| 69 74 54 65 78 74 2e 0d | 53 6f 6c 75 74 69 6f 6e |itText..|Solution|
|00005230| 3a 09 4e 6f 74 20 79 65 | 74 20 64 65 74 65 72 6d |:.Not ye|t determ|
|00005240| 69 6e 65 64 2e 0d 32 2e | 09 54 45 64 69 74 54 65 |ined..2.|.TEditTe|
|00005250| 78 74 20 69 74 65 6d 73 | 20 69 6e 20 54 44 69 61 |xt items| in TDia|
|00005260| 6c 6f 67 56 69 65 77 73 | 20 6e 6f 20 6c 6f 6e 67 |logViews| no long|
|00005270| 65 72 20 67 65 74 20 74 | 68 65 20 66 69 72 73 74 |er get t|he first|
|00005280| 20 63 72 61 63 6b 20 61 | 74 20 65 76 65 6e 74 73 | crack a|t events|
|00005290| 2c 20 61 73 20 74 68 65 | 79 20 75 73 65 64 20 74 |, as the|y used t|
|000052a0| 6f 20 69 6e 20 4d 61 63 | 41 70 70 20 32 2e 30 62 |o in Mac|App 2.0b|
|000052b0| 39 2e 20 20 54 68 65 20 | 65 76 65 6e 74 20 68 61 |9. The |event ha|
|000052c0| 6e 64 6c 65 72 20 63 68 | 61 69 6e 20 69 73 20 6e |ndler ch|ain is n|
|000052d0| 6f 77 20 67 54 61 72 67 | 65 74 20 2d 3e 20 54 44 |ow gTarg|et -> TD|
|000052e0| 69 61 6c 6f 67 54 45 56 | 69 65 77 20 2d 3e 20 54 |ialogTEV|iew -> T|
|000052f0| 53 63 72 6f 6c 6c 65 72 | 20 2d 3e 20 54 45 64 69 |Scroller| -> TEdi|
|00005300| 74 54 65 78 74 20 2d 3e | 20 54 44 69 61 6c 6f 67 |tText ->| TDialog|
|00005310| 56 69 65 77 20 2d 3e 20 | 65 74 63 2e 2c 20 73 6f |View -> |etc., so|
|00005320| 20 61 6c 6c 20 65 76 65 | 6e 74 73 20 69 6e 20 77 | all eve|nts in w|
|00005330| 68 69 63 68 20 61 20 73 | 75 62 63 6c 61 73 73 20 |hich a s|ubclass |
|00005340| 6f 66 20 54 45 64 69 74 | 54 65 78 74 20 6d 69 67 |of TEdit|Text mig|
|00005350| 68 74 20 62 65 20 69 6e | 74 65 72 65 73 74 65 64 |ht be in|terested|
|00005360| 20 61 72 65 20 63 61 75 | 67 68 74 20 62 79 20 54 | are cau|ght by T|
|00005370| 44 69 61 6c 6f 67 54 45 | 56 69 65 77 2e 0d 53 6f |DialogTE|View..So|
|00005380| 6c 75 74 69 6f 6e 3a 09 | 43 72 65 61 74 65 20 79 |lution:.|Create y|
|00005390| 6f 75 72 20 6f 77 6e 20 | 73 75 62 63 6c 61 73 73 |our own |subclass|
|000053a0| 20 6f 66 20 54 44 69 61 | 6c 6f 67 54 45 56 69 65 | of TDia|logTEVie|
|000053b0| 77 20 74 68 61 74 20 68 | 61 6e 64 6c 65 73 20 74 |w that h|andles t|
|000053c0| 68 65 20 69 6e 74 65 72 | 65 73 74 69 6e 67 20 63 |he inter|esting c|
|000053d0| 68 61 72 61 63 74 65 72 | 73 20 62 79 20 6f 76 65 |haracter|s by ove|
|000053e0| 72 72 69 64 69 6e 67 20 | 54 44 69 61 6c 6f 67 56 |rriding |TDialogV|
|000053f0| 69 65 77 2e 4d 61 6b 65 | 54 45 56 69 65 77 20 61 |iew.Make|TEView a|
|00005400| 6e 64 20 72 65 74 75 72 | 6e 69 6e 67 20 79 6f 75 |nd retur|ning you|
|00005410| 72 20 6f 77 6e 20 73 75 | 62 63 6c 61 73 73 20 6f |r own su|bclass o|
|00005420| 66 20 54 44 69 61 6c 6f | 67 54 45 56 69 65 77 2e |f TDialo|gTEView.|
|00005430| 0d 46 69 78 3a 09 41 20 | 63 6c 65 61 6e 20 66 69 |.Fix:.A |clean fi|
|00005440| 78 20 74 6f 20 74 68 69 | 73 20 70 72 6f 62 6c 65 |x to thi|s proble|
|00005450| 6d 20 6d 69 67 68 74 20 | 62 65 20 74 6f 20 72 65 |m might |be to re|
|00005460| 61 72 72 61 6e 67 65 20 | 74 68 65 20 65 76 65 6e |arrange |the even|
|00005470| 74 20 68 61 6e 64 6c 65 | 72 20 63 68 61 69 6e 20 |t handle|r chain |
|00005480| 74 6f 20 67 54 61 72 67 | 65 74 20 2d 3e 20 54 45 |to gTarg|et -> TE|
|00005490| 64 69 74 54 65 78 74 20 | 2d 3e 20 54 44 69 61 6c |ditText |-> TDial|
|000054a0| 6f 67 54 45 56 69 65 77 | 20 2d 3e 20 54 53 63 72 |ogTEView| -> TScr|
|000054b0| 6f 6c 6c 65 72 20 2d 3e | 20 54 44 69 61 6c 6f 67 |oller ->| TDialog|
|000054c0| 56 69 65 77 20 2d 3e 20 | 65 74 63 2e 20 20 48 6f |View -> |etc. Ho|
|000054d0| 77 65 76 65 72 2c 20 74 | 68 69 73 20 61 70 70 72 |wever, t|his appr|
|000054e0| 6f 61 63 68 20 69 73 20 | 6d 6f 72 65 20 77 6f 72 |oach is |more wor|
|000054f0| 6b 20 66 6f 72 20 54 44 | 69 61 6c 6f 67 54 45 56 |k for TD|ialogTEV|
|00005500| 69 65 77 2e 49 6e 73 74 | 61 6c 6c 45 64 69 74 54 |iew.Inst|allEditT|
|00005510| 65 78 74 2c 20 61 6e 64 | 20 74 68 65 20 65 66 66 |ext, and| the eff|
|00005520| 65 63 74 73 20 6f 66 20 | 72 65 61 72 72 61 6e 67 |ects of |rearrang|
|00005530| 69 6e 67 20 74 68 65 20 | 74 61 72 67 65 74 20 63 |ing the |target c|
|00005540| 68 61 69 6e 20 61 72 65 | 20 63 75 72 72 65 6e 74 |hain are| current|
|00005550| 6c 79 20 75 6e 74 65 73 | 74 65 64 2e 0d 54 45 76 |ly untes|ted..TEv|
|00005560| 74 48 61 6e 64 6c 65 72 | 0d 31 2e 09 54 45 76 74 |tHandler|.1..TEvt|
|00005570| 48 61 6e 64 6c 65 72 2e | 44 6f 43 72 65 61 74 65 |Handler.|DoCreate|
|00005580| 56 69 65 77 73 20 6e 6f | 77 20 63 61 6c 6c 73 20 |Views no|w calls |
|00005590| 54 56 69 65 77 2e 41 64 | 6a 75 73 74 53 69 7a 65 |TView.Ad|justSize|
|000055a0| 20 6f 6e 20 74 68 65 20 | 72 6f 6f 74 20 76 69 65 | on the |root vie|
|000055b0| 77 20 69 74 20 6a 75 73 | 74 20 63 72 65 61 74 65 |w it jus|t create|
|000055c0| 64 2e 20 20 54 68 69 73 | 20 63 68 61 6e 67 65 20 |d. This| change |
|000055d0| 77 61 73 20 6d 61 64 65 | 20 74 6f 20 67 69 76 65 |was made| to give|
|000055e0| 20 76 69 65 77 73 20 61 | 6e 20 65 61 72 6c 79 20 | views a|n early |
|000055f0| 63 68 61 6e 63 65 20 74 | 6f 20 6d 61 6b 65 20 73 |chance t|o make s|
|00005600| 75 72 65 20 74 68 65 79 | 20 61 72 65 20 63 6f 72 |ure they| are cor|
|00005610| 72 65 63 74 6c 79 20 73 | 69 7a 65 64 2e 20 20 48 |rectly s|ized. H|
|00005620| 6f 77 65 76 65 72 2c 20 | 74 68 65 20 63 68 61 6e |owever, |the chan|
|00005630| 67 65 20 63 61 6e 20 63 | 61 75 73 65 20 79 6f 75 |ge can c|ause you|
|00005640| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 6f |r applic|ation to|
|00005650| 20 62 72 65 61 6b 20 69 | 66 20 79 6f 75 20 6f 76 | break i|f you ov|
|00005660| 65 72 72 69 64 65 20 72 | 6f 75 74 69 6e 65 73 20 |erride r|outines |
|00005670| 74 68 61 74 20 70 65 72 | 66 6f 72 6d 20 41 64 6a |that per|form Adj|
|00005680| 75 73 74 53 69 7a 65 20 | 63 61 6c 6c 73 20 28 6c |ustSize |calls (l|
|00005690| 69 6b 65 20 54 56 69 65 | 77 2e 43 61 6c 63 4d 69 |ike TVie|w.CalcMi|
|000056a0| 6e 53 69 7a 65 29 20 61 | 6e 64 20 74 68 6f 73 65 |nSize) a|nd those|
|000056b0| 20 72 6f 75 74 69 6e 65 | 73 20 72 65 6c 79 20 6f | routine|s rely o|
|000056c0| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 74 68 |n inform|ation th|
|000056d0| 61 74 20 69 73 20 6e 6f | 74 20 69 6e 69 74 69 61 |at is no|t initia|
|000056e0| 6c 69 7a 65 64 20 75 6e | 74 69 6c 20 61 66 74 65 |lized un|til afte|
|000056f0| 72 20 44 6f 43 72 65 61 | 74 65 56 69 65 77 73 20 |r DoCrea|teViews |
|00005700| 72 65 74 75 72 6e 73 20 | 74 6f 20 54 59 6f 75 72 |returns |to TYour|
|00005710| 44 6f 63 75 6d 65 6e 74 | 2e 44 6f 4d 61 6b 65 56 |Document|.DoMakeV|
|00005720| 69 65 77 73 2e 0d 53 6f | 6c 75 74 69 6f 6e 3a 09 |iews..So|lution:.|
|00005730| 53 69 6d 70 6c 79 20 62 | 65 20 61 77 61 72 65 20 |Simply b|e aware |
|00005740| 6f 66 20 74 68 69 73 20 | 63 68 61 6e 67 65 2e 20 |of this |change. |
|00005750| 20 49 66 20 79 6f 75 20 | 69 6e 69 74 69 61 6c 69 | If you |initiali|
|00005760| 7a 65 20 66 69 65 6c 64 | 73 20 6f 66 20 79 6f 75 |ze field|s of you|
|00005770| 72 20 76 69 65 77 73 20 | 69 6e 20 79 6f 75 72 20 |r views |in your |
|00005780| 44 6f 4d 61 6b 65 56 69 | 65 77 73 20 6d 65 74 68 |DoMakeVi|ews meth|
|00005790| 6f 64 2c 20 74 68 65 6e | 20 6f 76 65 72 72 69 64 |od, then| overrid|
|000057a0| 65 73 20 6f 66 20 6d 65 | 74 68 6f 64 73 20 73 75 |es of me|thods su|
|000057b0| 63 68 20 61 73 20 54 56 | 69 65 77 2e 52 65 73 69 |ch as TV|iew.Resi|
|000057c0| 7a 65 2c 20 54 56 69 65 | 77 2e 43 6f 6d 70 75 74 |ze, TVie|w.Comput|
|000057d0| 65 53 69 7a 65 2c 20 61 | 6e 64 20 54 56 69 65 77 |eSize, a|nd TView|
|000057e0| 2e 43 61 6c 63 4d 69 6e | 53 69 7a 65 20 73 68 6f |.CalcMin|Size sho|
|000057f0| 75 6c 64 20 74 61 6b 65 | 20 69 6e 74 6f 20 61 63 |uld take| into ac|
|00005800| 63 6f 75 6e 74 20 74 68 | 61 74 20 74 68 65 73 65 |count th|at these|
|00005810| 20 66 69 65 6c 64 73 20 | 6d 61 79 20 6e 6f 74 20 | fields |may not |
|00005820| 79 65 74 20 62 65 20 69 | 6e 69 74 69 61 6c 69 7a |yet be i|nitializ|
|00005830| 65 64 2e 20 20 41 74 20 | 74 68 65 20 76 65 72 79 |ed. At |the very|
|00005840| 20 6c 65 61 73 74 2c 20 | 54 59 6f 75 72 56 69 65 | least, |TYourVie|
|00005850| 77 2e 49 52 65 73 20 73 | 68 6f 75 6c 64 20 73 65 |w.IRes s|hould se|
|00005860| 74 20 74 68 65 73 65 20 | 66 69 65 6c 64 73 20 74 |t these |fields t|
|00005870| 6f 20 4e 49 4c 2e 0d 54 | 47 72 69 64 56 69 65 77 |o NIL..T|GridView|
|00005880| 0d 31 2e 09 41 74 74 65 | 6d 70 74 69 6e 67 20 74 |.1..Atte|mpting t|
|00005890| 6f 20 73 65 6c 65 63 74 | 20 61 20 54 47 72 69 64 |o select| a TGrid|
|000058a0| 56 69 65 77 63 65 6c 6c | 20 66 6f 72 20 77 68 69 |Viewcell| for whi|
|000058b0| 63 68 20 43 61 6e 53 65 | 6c 65 63 74 43 65 6c 6c |ch CanSe|lectCell|
|000058c0| 20 72 65 74 75 72 6e 73 | 20 46 41 4c 53 45 20 63 | returns| FALSE c|
|000058d0| 61 75 73 65 73 20 74 68 | 65 20 63 75 72 72 65 6e |auses th|e curren|
|000058e0| 74 20 73 65 6c 65 63 74 | 69 6f 6e 20 74 6f 20 62 |t select|ion to b|
|000058f0| 65 20 64 65 73 65 6c 65 | 63 74 65 64 2e 0d 53 6f |e desele|cted..So|
|00005900| 6c 75 74 69 6f 6e 3a 09 | 4f 76 65 72 72 69 64 65 |lution:.|Override|
|00005910| 20 54 47 72 69 64 56 69 | 65 77 2e 44 6f 4d 6f 75 | TGridVi|ew.DoMou|
|00005920| 73 65 43 6f 6d 6d 61 6e | 64 20 74 6f 20 63 61 6c |seComman|d to cal|
|00005930| 6c 20 49 64 65 6e 74 69 | 66 79 50 6f 69 6e 74 2e |l Identi|fyPoint.|
|00005940| 20 20 49 66 20 61 20 76 | 61 6c 69 64 20 63 65 6c | If a v|alid cel|
|00005950| 6c 20 69 73 20 72 65 74 | 75 72 6e 65 64 2c 20 63 |l is ret|urned, c|
|00005960| 61 6c 6c 20 43 61 6e 53 | 65 6c 65 63 74 43 65 6c |all CanS|electCel|
|00005970| 6c 2e 20 20 49 66 20 69 | 74 20 72 65 74 75 72 6e |l. If i|t return|
|00005980| 73 20 54 52 55 45 2c 20 | 63 61 6c 6c 20 49 4e 48 |s TRUE, |call INH|
|00005990| 45 52 49 54 45 44 20 44 | 6f 4d 6f 75 73 65 43 6f |ERITED D|oMouseCo|
|000059a0| 6d 6d 61 6e 64 2e 20 20 | 54 68 69 73 20 69 6e 68 |mmand. |This inh|
|000059b0| 69 62 69 74 73 20 61 6c | 6c 20 74 72 61 63 6b 69 |ibits al|l tracki|
|000059c0| 6e 67 20 69 66 20 74 68 | 65 20 75 73 65 72 20 69 |ng if th|e user i|
|000059d0| 6e 69 74 69 61 6c 6c 79 | 20 63 6c 69 63 6b 73 20 |nitially| clicks |
|000059e0| 69 6e 20 61 20 64 69 73 | 61 62 6c 65 64 20 63 65 |in a dis|abled ce|
|000059f0| 6c 6c 2e 0d 46 69 78 3a | 09 52 65 70 6c 61 63 65 |ll..Fix:|.Replace|
|00005a00| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6c | the fol|lowing l|
|00005a10| 69 6e 65 20 69 6e 20 54 | 43 65 6c 6c 53 65 6c 65 |ine in T|CellSele|
|00005a20| 63 74 43 6f 6d 6d 61 6e | 64 2e 54 72 61 63 6b 4d |ctComman|d.TrackM|
|00005a30| 6f 75 73 65 20 28 66 69 | 6c 65 20 55 47 72 69 64 |ouse (fi|le UGrid|
|00005a40| 56 69 65 77 2e 69 6e 63 | 31 2e 70 29 3a 0d 20 20 |View.inc|1.p):. |
|00005a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 46 20 4c | | IF L|
|00005a60| 4f 4e 47 49 4e 54 28 63 | 6c 69 63 6b 65 64 43 65 |ONGINT(c|lickedCe|
|00005a70| 6c 6c 29 20 3c 3e 20 4c | 4f 4e 47 49 4e 54 28 66 |ll) <> L|ONGINT(f|
|00005a80| 50 72 65 76 43 65 6c 6c | 29 0d 09 57 69 74 68 3a |PrevCell|)..With:|
|00005a90| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 49 |. | I|
|00005aa0| 46 20 28 4c 4f 4e 47 49 | 4e 54 28 63 6c 69 63 6b |F (LONGI|NT(click|
|00005ab0| 65 64 43 65 6c 6c 29 20 | 3c 3e 20 4c 4f 4e 47 49 |edCell) |<> LONGI|
|00005ac0| 4e 54 28 66 50 72 65 76 | 43 65 6c 6c 29 29 0d 20 |NT(fPrev|Cell)). |
|00005ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 26 | | &|
|00005ae0| 20 66 47 72 69 64 56 69 | 65 77 2e 43 61 6e 53 65 | fGridVi|ew.CanSe|
|00005af0| 6c 65 63 74 43 65 6c 6c | 28 63 6c 69 63 6b 65 64 |lectCell|(clicked|
|00005b00| 43 65 6c 6c 29 0d 32 2e | 09 46 69 78 65 64 20 69 |Cell).2.|.Fixed i|
|00005b10| 6e 20 4d 61 63 41 70 70 | 20 32 2e 30 2e 31 2e 0d |n MacApp| 2.0.1..|
|00005b20| 33 2e 09 54 47 72 69 64 | 56 69 65 77 2e 44 72 61 |3..TGrid|View.Dra|
|00005b30| 77 43 65 6c 6c 20 69 73 | 20 63 61 6c 6c 65 64 20 |wCell is| called |
|00005b40| 77 69 74 68 20 74 68 65 | 20 63 6c 69 70 20 72 65 |with the| clip re|
|00005b50| 67 69 6f 6e 20 73 65 74 | 20 77 69 64 65 20 6f 70 |gion set| wide op|
|00005b60| 65 6e 2c 20 77 68 69 63 | 68 20 61 6c 6c 6f 77 73 |en, whic|h allows|
|00005b70| 20 61 6e 79 20 6f 76 65 | 72 72 69 64 65 20 6f 66 | any ove|rride of|
|00005b80| 20 44 72 61 77 43 65 6c | 6c 20 74 6f 20 64 72 61 | DrawCel|l to dra|
|00005b90| 77 20 61 6e 79 77 68 65 | 72 65 20 77 69 74 68 69 |w anywhe|re withi|
|00005ba0| 6e 20 74 68 65 20 54 47 | 72 69 64 56 69 65 77 2e |n the TG|ridView.|
|00005bb0| 20 20 49 74 20 69 73 20 | 6c 69 6b 65 6c 79 20 74 | It is |likely t|
|00005bc0| 68 61 74 20 74 68 69 73 | 20 69 73 20 6e 6f 74 20 |hat this| is not |
|00005bd0| 64 65 73 69 72 65 64 2c | 20 61 6e 64 20 74 68 65 |desired,| and the|
|00005be0| 20 72 65 73 70 6f 6e 73 | 69 62 69 6c 69 74 79 20 | respons|ibility |
|00005bf0| 66 6f 72 20 63 6c 69 70 | 70 69 6e 67 20 63 6f 75 |for clip|ping cou|
|00005c00| 6c 64 20 62 65 20 61 64 | 64 65 64 20 74 6f 20 54 |ld be ad|ded to T|
|00005c10| 47 72 69 64 56 69 65 77 | 2e 0d 46 69 78 3a 09 49 |GridView|..Fix:.I|
|00005c20| 6e 20 54 47 72 69 64 56 | 69 65 77 2e 44 72 61 77 |n TGridV|iew.Draw|
|00005c30| 52 61 6e 67 65 4f 66 43 | 65 6c 6c 73 20 28 66 69 |RangeOfC|ells (fi|
|00005c40| 6c 65 20 55 47 72 69 64 | 56 69 65 77 2e 69 6e 63 |le UGrid|View.inc|
|00005c50| 31 2e 70 29 2c 20 61 64 | 64 20 61 20 6c 6f 63 61 |1.p), ad|d a loca|
|00005c60| 6c 20 52 67 6e 48 61 6e | 64 6c 65 20 63 61 6c 6c |l RgnHan|dle call|
|00005c70| 65 64 20 6f 6c 64 43 6c | 69 70 2e 20 20 49 6e 69 |ed oldCl|ip. Ini|
|00005c80| 74 69 61 6c 69 7a 65 20 | 6f 6c 64 43 6c 69 70 20 |tialize |oldClip |
|00005c90| 77 69 74 68 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |with the| followi|
|00005ca0| 6e 67 20 6c 69 6e 65 73 | 20 61 74 20 74 68 65 20 |ng lines| at the |
|00005cb0| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|00005cc0| 20 6d 65 74 68 6f 64 3a | 0d 20 20 20 20 20 20 20 | method:|. |
|00005cd0| 20 20 20 20 20 20 20 6f | 6c 64 43 6c 69 70 20 3a | o|ldClip :|
|00005ce0| 3d 20 4d 61 6b 65 4e 65 | 77 52 67 6e 3b 0d 20 20 |= MakeNe|wRgn;. |
|00005cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 47 65 74 43 | | GetC|
|00005d00| 6c 69 70 28 6f 6c 64 43 | 6c 69 70 29 3b 0d 09 4e |lip(oldC|lip);..N|
|00005d10| 65 78 74 2c 20 63 6c 69 | 70 20 74 6f 20 74 68 65 |ext, cli|p to the|
|00005d20| 20 63 75 72 72 65 6e 74 | 20 63 65 6c 6c 20 62 79 | current| cell by|
|00005d30| 20 61 64 64 69 6e 67 20 | 74 68 65 20 66 6f 6c 6c | adding |the foll|
|00005d40| 6f 77 69 6e 67 20 6c 69 | 6e 65 73 20 62 65 66 6f |owing li|nes befo|
|00005d50| 72 65 20 74 68 65 20 6c | 69 6e 65 20 74 68 61 74 |re the l|ine that|
|00005d60| 20 73 61 79 73 20 61 43 | 65 6c 6c 2e 68 20 3a 3d | says aC|ell.h :=|
|00005d70| 20 69 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | i:. | |
|00005d80| 20 20 7b 24 49 46 43 20 | 71 44 65 62 75 67 7d 0d | {$IFC |qDebug}.|
|00005d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005da0| 20 20 55 73 65 54 65 6d | 70 52 67 6e 28 27 54 47 | UseTem|pRgn('TG|
|00005db0| 72 69 64 56 69 65 77 2e | 44 72 61 77 52 61 6e 67 |ridView.|DrawRang|
|00005dc0| 65 4f 66 43 65 6c 6c 73 | 27 29 3b 0d 20 20 20 20 |eOfCells|');. |
|00005dd0| 20 20 20 20 20 20 20 20 | 20 20 7b 24 45 4e 44 43 | | {$ENDC|
|00005de0| 7d 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00005df0| 52 65 63 74 52 67 6e 28 | 67 54 65 6d 70 52 67 6e |RectRgn(|gTempRgn|
|00005e00| 2c 20 61 51 44 52 65 63 | 74 29 3b 0d 20 20 20 20 |, aQDRec|t);. |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 53 65 63 74 52 67 | | SectRg|
|00005e20| 6e 28 6f 6c 64 43 6c 69 | 70 2c 20 67 54 65 6d 70 |n(oldCli|p, gTemp|
|00005e30| 52 67 6e 2c 20 67 54 65 | 6d 70 52 67 6e 29 3b 0d |Rgn, gTe|mpRgn);.|
|00005e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 53 65 | | Se|
|00005e50| 74 43 6c 69 70 28 67 54 | 65 6d 70 52 67 6e 29 3b |tClip(gT|empRgn);|
|00005e60| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b |. | {|
|00005e70| 24 49 46 43 20 71 44 65 | 62 75 67 7d 0d 20 20 20 |$IFC qDe|bug}. |
|00005e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 44 | | D|
|00005e90| 6f 6e 65 57 69 74 68 54 | 65 6d 70 52 67 6e 3b 0d |oneWithT|empRgn;.|
|00005ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 24 | | {$|
|00005eb0| 45 4e 44 43 7d 0d 09 46 | 69 6e 61 6c 6c 79 2c 20 |ENDC}..F|inally, |
|00005ec0| 61 64 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |add the |followin|
|00005ed0| 67 20 6c 69 6e 65 73 20 | 61 74 20 74 68 65 20 65 |g lines |at the e|
|00005ee0| 6e 64 20 6f 66 20 74 68 | 65 20 6d 65 74 68 6f 64 |nd of th|e method|
|00005ef0| 3a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:. | |
|00005f00| 53 65 74 43 6c 69 70 28 | 6f 6c 64 43 6c 69 70 29 |SetClip(|oldClip)|
|00005f10| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00005f20| 44 69 73 70 6f 73 65 52 | 67 6e 28 6f 6c 64 43 6c |DisposeR|gn(oldCl|
|00005f30| 69 70 29 3b 0d 54 49 63 | 6f 6e 0d 31 2e 09 46 69 |ip);.TIc|on.1..Fi|
|00005f40| 78 65 64 20 69 6e 20 4d | 61 63 41 70 70 20 32 2e |xed in M|acApp 2.|
|00005f50| 30 2e 31 2e 0d 54 4c 69 | 73 74 0d 31 2e 09 49 66 |0.1..TLi|st.1..If|
|00005f60| 20 79 6f 75 20 68 61 76 | 65 20 61 20 54 4c 69 73 | you hav|e a TLis|
|00005f70| 74 20 73 75 62 63 6c 61 | 73 73 20 77 69 74 68 20 |t subcla|ss with |
|00005f80| 61 20 53 74 72 69 6e 67 | 20 69 6e 73 74 61 6e 63 |a String| instanc|
|00005f90| 65 20 76 61 72 69 61 62 | 6c 65 2c 20 69 74 20 69 |e variab|le, it i|
|00005fa0| 73 20 6e 6f 74 20 70 6f | 73 73 69 62 6c 65 20 74 |s not po|ssible t|
|00005fb0| 6f 20 75 73 65 20 74 68 | 65 20 50 61 73 63 61 6c |o use th|e Pascal|
|00005fc0| 20 73 74 72 69 6e 67 20 | 62 75 69 6c 74 2d 69 6e | string |built-in|
|00005fd0| 20 66 75 6e 63 74 69 6f | 6e 20 44 65 6c 65 74 65 | functio|n Delete|
|00005fe0| 20 6f 6e 20 69 74 20 62 | 65 63 61 75 73 65 20 74 | on it b|ecause t|
|00005ff0| 68 65 20 4f 62 6a 65 63 | 74 20 50 61 73 63 61 6c |he Objec|t Pascal|
|00006000| 20 73 63 6f 70 69 6e 67 | 20 72 75 6c 65 73 20 61 | scoping| rules a|
|00006010| 6c 77 61 79 73 20 61 73 | 73 6f 63 69 61 74 65 20 |lways as|sociate |
|00006020| 74 68 65 20 6e 61 6d 65 | 20 44 65 6c 65 74 65 20 |the name| Delete |
|00006030| 77 69 74 68 20 54 4c 69 | 73 74 2e 44 65 6c 65 74 |with TLi|st.Delet|
|00006040| 65 2e 0d 53 6f 6c 75 74 | 69 6f 6e 3a 09 41 70 70 |e..Solut|ion:.App|
|00006050| 6c 65 20 77 69 6c 6c 20 | 63 68 61 6e 67 65 20 74 |le will |change t|
|00006060| 68 65 20 6e 61 6d 65 20 | 69 6e 20 74 68 65 20 66 |he name |in the f|
|00006070| 75 74 75 72 65 2e 20 20 | 49 6e 20 74 68 65 20 6d |uture. |In the m|
|00006080| 65 61 6e 74 69 6d 65 2c | 20 79 6f 75 20 63 6f 75 |eantime,| you cou|
|00006090| 6c 64 20 6d 61 6b 65 20 | 61 20 67 6c 6f 62 61 6c |ld make |a global|
|000060a0| 20 72 6f 75 74 69 6e 65 | 20 4d 79 44 65 6c 65 74 | routine| MyDelet|
|000060b0| 65 20 74 68 61 74 20 77 | 6f 75 6c 64 20 62 65 20 |e that w|ould be |
|000060c0| 61 20 77 72 61 70 70 65 | 72 20 66 6f 72 20 74 68 |a wrappe|r for th|
|000060d0| 65 20 73 74 72 69 6e 67 | 20 44 65 6c 65 74 65 20 |e string| Delete |
|000060e0| 72 6f 75 74 69 6e 65 2e | 0d 54 4e 75 6d 62 65 72 |routine.|.TNumber|
|000060f0| 54 65 78 74 0d 31 2e 09 | 57 68 65 6e 20 74 68 65 |Text.1..|When the|
|00006100| 20 6c 65 6e 67 74 68 20 | 6f 66 20 74 68 65 20 74 | length |of the t|
|00006110| 65 78 74 20 69 6e 20 61 | 20 54 4e 75 6d 62 65 72 |ext in a| TNumber|
|00006120| 54 65 78 74 20 69 6e 73 | 74 61 6e 63 65 20 69 73 |Text ins|tance is|
|00006130| 20 30 2c 20 47 65 74 56 | 61 6c 75 65 20 72 65 74 | 0, GetV|alue ret|
|00006140| 75 72 6e 73 20 30 2c 20 | 61 6e 64 20 56 61 6c 69 |urns 0, |and Vali|
|00006150| 64 61 74 65 20 72 65 74 | 75 72 6e 73 20 6b 56 61 |date ret|urns kVa|
|00006160| 6c 69 64 56 61 6c 75 65 | 2e 20 20 54 68 65 20 76 |lidValue|. The v|
|00006170| 61 6c 75 65 20 69 73 20 | 6e 6f 74 20 63 68 65 63 |alue is |not chec|
|00006180| 6b 65 64 20 61 67 61 69 | 6e 73 74 20 66 4d 69 6e |ked agai|nst fMin|
|00006190| 69 6d 75 6d 20 6f 72 20 | 66 4d 61 78 69 6d 75 6d |imum or |fMaximum|
|000061a0| 2c 20 73 6f 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |, so you|r applic|
|000061b0| 61 74 69 6f 6e 20 6d 61 | 79 20 62 65 20 66 65 64 |ation ma|y be fed|
|000061c0| 20 77 69 74 68 20 61 20 | 76 61 6c 75 65 20 69 74 | with a |value it|
|000061d0| 20 69 73 20 6e 6f 74 20 | 70 72 65 70 61 72 65 64 | is not |prepared|
|000061e0| 20 74 6f 20 68 61 6e 64 | 6c 65 2e 0d 46 69 78 3a | to hand|le..Fix:|
|000061f0| 09 49 64 65 61 73 20 66 | 6f 72 20 73 6f 6c 75 74 |.Ideas f|or solut|
|00006200| 69 6f 6e 73 20 6f 72 20 | 66 69 78 65 73 20 61 72 |ions or |fixes ar|
|00006210| 65 20 6f 75 74 6c 69 6e | 65 64 20 69 6e 20 74 68 |e outlin|ed in th|
|00006220| 65 20 63 6f 6d 6d 65 6e | 74 20 69 6e 20 54 4e 75 |e commen|t in TNu|
|00006230| 6d 62 65 72 54 65 78 74 | 2e 56 61 6c 69 64 61 74 |mberText|.Validat|
|00006240| 65 20 28 66 69 6c 65 20 | 55 44 69 61 6c 6f 67 2e |e (file |UDialog.|
|00006250| 69 6e 63 31 2e 70 29 2e | 0d 54 50 6f 70 75 70 0d |inc1.p).|.TPopup.|
|00006260| 31 2e 09 46 69 78 65 64 | 20 69 6e 20 4d 61 63 41 |1..Fixed| in MacA|
|00006270| 70 70 20 32 2e 30 2e 31 | 2e 0d 32 2e 09 46 69 78 |pp 2.0.1|..2..Fix|
|00006280| 65 64 20 69 6e 20 4d 61 | 63 41 70 70 20 32 2e 30 |ed in Ma|cApp 2.0|
|00006290| 2e 31 2e 0d 33 2e 09 46 | 69 78 65 64 20 69 6e 20 |.1..3..F|ixed in |
|000062a0| 4d 61 63 41 70 70 20 32 | 2e 30 2e 31 2e 0d 34 2e |MacApp 2|.0.1..4.|
|000062b0| 09 54 50 6f 70 75 70 20 | 6e 6f 20 6c 6f 6e 67 65 |.TPopup |no longe|
|000062c0| 72 20 63 61 6c 6c 73 20 | 44 6f 43 68 6f 69 63 65 |r calls |DoChoice|
|000062d0| 20 69 66 20 74 68 65 20 | 73 61 6d 65 20 69 74 65 | if the |same ite|
|000062e0| 6d 20 69 73 20 72 65 73 | 65 6c 65 63 74 65 64 2e |m is res|elected.|
|000062f0| 0d 46 69 78 3a 09 49 6e | 20 54 50 6f 70 75 70 2e |.Fix:.In| TPopup.|
|00006300| 44 6f 4d 6f 75 73 65 43 | 6f 6d 6d 61 6e 64 20 28 |DoMouseC|ommand (|
|00006310| 66 69 6c 65 20 55 44 69 | 61 6c 6f 67 2e 69 6e 63 |file UDi|alog.inc|
|00006320| 31 2e 70 29 20 69 73 20 | 74 68 65 20 66 6f 6c 6c |1.p) is |the foll|
|00006330| 6f 77 69 6e 67 20 6c 69 | 6e 65 3a 0d 20 20 20 20 |owing li|ne:. |
|00006340| 20 20 20 20 20 20 20 20 | 20 20 49 46 20 28 48 69 | | IF (Hi|
|00006350| 57 6f 72 64 28 72 65 73 | 75 6c 74 29 20 3c 3e 20 |Word(res|ult) <> |
|00006360| 30 29 20 26 20 28 6e 65 | 77 43 68 6f 69 63 65 20 |0) & (ne|wChoice |
|00006370| 3c 3e 20 66 43 75 72 72 | 65 6e 74 49 74 65 6d 29 |<> fCurr|entItem)|
|00006380| 20 54 48 45 4e 0d 09 52 | 65 6d 6f 76 65 20 74 68 | THEN..R|emove th|
|00006390| 65 20 d2 26 20 28 6e 65 | 77 43 68 6f 69 63 65 20 |e .& (ne|wChoice |
|000063a0| 3c 3e 20 66 43 75 72 72 | 65 6e 74 49 74 65 6d 29 |<> fCurr|entItem)|
|000063b0| d3 20 70 61 72 74 2e 0d | 35 2e 09 54 50 6f 70 75 |. part..|5..TPopu|
|000063c0| 70 2e 53 65 74 43 75 72 | 72 65 6e 74 49 74 65 6d |p.SetCur|rentItem|
|000063d0| 20 6e 65 69 74 68 65 72 | 20 72 65 73 74 6f 72 65 | neither| restore|
|000063e0| 73 20 74 68 65 20 70 6f | 72 74 20 63 6f 6c 6f 72 |s the po|rt color|
|000063f0| 73 20 63 6f 72 72 65 63 | 74 6c 79 20 6e 6f 72 20 |s correc|tly nor |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.